From 2395011a0d0d13a444f52e8ac787e14fa4a5e8b4 Mon Sep 17 00:00:00 2001 From: Ivo List Date: Fri, 31 May 2024 10:30:10 +0200 Subject: [PATCH] Add Publish to BCR setup (#518) * Add Publish to BCR setup * Update maintainers guide * Add maintainers --- .bcr/config.yml | 4 ++++ .bcr/metadata.template.json | 15 +++++++++++++++ .bcr/presubmit.yml | 18 ++++++++++++++++++ .bcr/source.template.json | 5 +++++ docs/maintainers_guide.md | 33 ++++++++------------------------- 5 files changed, 50 insertions(+), 25 deletions(-) create mode 100644 .bcr/config.yml create mode 100644 .bcr/metadata.template.json create mode 100644 .bcr/presubmit.yml create mode 100644 .bcr/source.template.json diff --git a/.bcr/config.yml b/.bcr/config.yml new file mode 100644 index 00000000..cd1be6ee --- /dev/null +++ b/.bcr/config.yml @@ -0,0 +1,4 @@ +moduleRoots: + - "." + - "gazelle" + diff --git a/.bcr/metadata.template.json b/.bcr/metadata.template.json new file mode 100644 index 00000000..66a25e13 --- /dev/null +++ b/.bcr/metadata.template.json @@ -0,0 +1,15 @@ +{ + "homepage": "https://github.com/bazelbuild/bazel-skylib", + "maintainers": [ + { + "email": "ilist@google.com", + "github": "comius", + "name": "Ivo Ristovski List" + } + ], + "versions": [], + "yanked_versions": {}, + "repository": [ + "github:bazelbuild/bazel-skylib" + ] +} diff --git a/.bcr/presubmit.yml b/.bcr/presubmit.yml new file mode 100644 index 00000000..09ab4c57 --- /dev/null +++ b/.bcr/presubmit.yml @@ -0,0 +1,18 @@ +matrix: + platform: + - centos7 + - debian10 + - macos + - ubuntu2004 + - windows + bazel: + - 7.x + - 6.x + - 5.x +tasks: + verify_build_targets: + name: "Verify build targets" + platform: ${{ platform }} + bazel: ${{ bazel }} + build_targets: + - "@bazel_skylib//..." diff --git a/.bcr/source.template.json b/.bcr/source.template.json new file mode 100644 index 00000000..2a997244 --- /dev/null +++ b/.bcr/source.template.json @@ -0,0 +1,5 @@ +{ + "integrity": "", + "strip_prefix": "", + "url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/bazel-skylib-{TAG}.tar.gz" +} diff --git a/docs/maintainers_guide.md b/docs/maintainers_guide.md index 9e6db782..9abdecfa 100644 --- a/docs/maintainers_guide.md +++ b/docs/maintainers_guide.md @@ -54,7 +54,8 @@ file under `docs` (generated by `bazel run //docs:update`). -------------------------------------------------------------------------------- -Release $VERSION +``` +# Release $VERSION **New Features** @@ -69,6 +70,7 @@ Release $VERSION **Contributors** Name 1, Name 2, Name 3 (alphabetically from `git log`) +``` -------------------------------------------------------------------------------- @@ -148,32 +150,13 @@ See [the source](https://github.com/bazelbuild/bazel-skylib/tree/$VERSION). -------------------------------------------------------------------------------- -8. Obtain [Subresource Integrity](https://w3c.github.io/webappsec-subresource-integrity/#integrity-metadata-description) - format checksums for bzlmod: - -```bash -echo -n sha256-; cat bazel-bin/distribution/bazel-skylib-$VERSION.tar.gz | openssl dgst -sha256 -binary | base64 -echo -n sha256-; cat bazel-bin/distribution/bazel-skylib-gazelle-plugin-$VERSION.tar.gz | openssl dgst -sha256 -binary | base64 -``` - -9. Create a PR at [Bazel Central Registry](https://github.com/bazelbuild/bazel-central-registry) - to update the registry's versions of bazel_skylib and - bazel_skylib_gazelle_plugin. +8. Review a PR at [Bazel Central Registry](https://github.com/bazelbuild/bazel-central-registry) + created by Publish-to-BCR plugin. Use https://github.com/bazelbuild/bazel-central-registry/pull/403 as the - model; you will need to update `modules/bazel_skylib/metadata.json` and - `modules/bazel_skylib_gazelle_plugin/metadata.json` to list the new version - in `versions`, and create new $VERSION subdirectories for the updated - modules, using the latest existing version subdirectories as the guide. Use - Subresource Integrity checksums obtained above in the new `source.json` - files. - - Ensure that the MODULE.bazel files you add in the new $VERSION - subdirectories exactly match the MODULE.bazel file packaged in - bazel-skylib-$VERSION.tar.gz and bazel-skylib-gazelle-plugin-$VERSION.tar.gz - tarballs - or buildkite checks will fail. - -10. Once the Bazel Central Registry PR is merged, insert in the release + model. + +9. Once the Bazel Central Registry PR is merged, insert in the release description after the WORKSPACE setup section: --------------------------------------------------------------------------------