Want to contribute? Great!
When you send a PR, our Contributor License Agreement needs to be signed, which is checked by the CLA bot, thanks to SAP for this service.
We suggest using a pre-commit hook to automate this. First install pre-commit, then run
pre-commit install
pre-commit install --hook-type commit-msg
Otherwise the CI will yell at you about formatting/linting violations.
To make changes to your go files, run the following to fix your dependencies and build files:
bazel run tidy
To run a command using the Bazel managed version of go, use the following pattern:
bazel run go --
followed by your go command
For instance, to view the version of go, you execute the following:
bazel run go -- version
If you have not made any custom changes to these files but have conflicts in your merge, then you can run:
git fetch origin --prune git checkout origin/main -- go.mod go.sum deps.bzl
bazel run //:tidy
This will fetch go.mod, go.sum and deps.bzl from origin/main and replace your files with them. Then, go tidy and gazelle will be run over these files to update them. After this, you should be able to merge your changes without any conflicts in those files.
-
Push a
x.x.x
tag to the repository at the commit you want to release with the semver version you want to use for the release:git tag x.x.x git push origin $_
A
v
version prefix is intentionally not included in the release tag so that the GitHub root download archivehttps://github.com/aspect-build/aspect-cli/releases/download
can be used for Bazelisk installs using.bazeliskrc
:BAZELISK_BASE_URL=https://github.com/aspect-build/aspect-cli/releases/download USE_BAZEL_VERSION=aspect/x.x.x
-
Watch the automation run on GitHub actions
-
For go module support, we also require a
v1.x.x
tag that corresponds to thex.x.x
release tag. We version the go module asv1.x.x
since consumingv2+
go modules downstream adds undesirable complication. For now with CLI major releases as5.x.x
the corresponding go module version should bev1.5xx.x
with the patch version matching and the minor zero-padded to two digits. (e.g.5.4.3
->v1.504.3
,5.56.78
->v1.556.78
)When the CLI major version is bumped to 6, this mapping will need to be updated.
git tag v1.5xx.x git push origin $_
-
Update Homebrew Formula
Once the GitHub release is complete and Aspect CLI release artifacts are available for download, follow the instructions in our homebrew-aspect repository to update the Homebrew Formulas in the
aspect-build/aspect
tap.
Install nginx
. On MacOS, run brew install nginx
.
Change the nginx
config so that it listens on part 8090
. By default, nginx
will listen on
localhost:8080
.
- Find the location of your
nginx
config, runnginx -t
. - Update the default server stanza to listen on
8090
. It should look like the following:
server {
listen 8090;
server_name localhost;
- Restart
nginx
. Runbrew services restart nginx
.
To verify that the built Homebrew formula and bottles build and install properly, please run the following:
$ bazel run //release:verify_homebrew_artifacts
This will build the artifacts, copy the bottles to your local nginx
webserver's
serving directory, create an aspect-build/aspect
tap, copy the formula to the
tap, install the bottle for your system, and verify that the version from the
CLI matches the expected version.
NOTE: This is not a test target, because it will copy files to various locations on your local machine. The default permissions for a test target do not allow this.
If you would like to perform the set up for this verification step without the assertions, you can
run the following (with or without the --stamp
flag):
$ bazel run //release:stage_for_dev