Skip to content

Commit

Permalink
Add Publish to BCR setup (#518)
Browse files Browse the repository at this point in the history
* Add Publish to BCR setup

* Update maintainers guide

* Add maintainers
  • Loading branch information
comius authored May 31, 2024
1 parent 12f1a04 commit 2395011
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 25 deletions.
4 changes: 4 additions & 0 deletions .bcr/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
moduleRoots:
- "."
- "gazelle"

15 changes: 15 additions & 0 deletions .bcr/metadata.template.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
18 changes: 18 additions & 0 deletions .bcr/presubmit.yml
Original file line number Diff line number Diff line change
@@ -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//..."
5 changes: 5 additions & 0 deletions .bcr/source.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"integrity": "",
"strip_prefix": "",
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/bazel-skylib-{TAG}.tar.gz"
}
33 changes: 8 additions & 25 deletions docs/maintainers_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ file under `docs` (generated by `bazel run //docs:update`).

--------------------------------------------------------------------------------

Release $VERSION
```
# Release $VERSION
**New Features**
Expand All @@ -69,6 +70,7 @@ Release $VERSION
**Contributors**
Name 1, Name 2, Name 3 (alphabetically from `git log`)
```

--------------------------------------------------------------------------------

Expand Down Expand Up @@ -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:

--------------------------------------------------------------------------------
Expand Down

0 comments on commit 2395011

Please sign in to comment.