# Contributing # Getting Started [Install][bazelisk-install] `bazelisk` and run the tests: ```sh $ bazelisk test //... $ (cd e2e; bazelisk test //...) ``` [bazelisk-install]: https://github.com/bazelbuild/bazelisk?tab=readme-ov-file#installation # Workflow - Follow the [contributions guide] to be granted forking permissions. - [Fork] the project - Implement the change - [Create merge request] from fork # Upgrading Binaries The following script can be ran in a POSIX shell: ```console # Clear out all integrities sed -i 's|"\([a-z0-9-]\+\)": "sha256.\+",|"\1": "",|g' MODULE.bazel # Run a fetch and update integrity for BINARY in $(rg --no-line-number '^ +"([a-z0-9-]+)": "",' -or '$1' MODULE.bazel); do INTEGRITY="$(bazelisk fetch @${BINARY}//:entrypoint 2>&1 | rg -o 'sha256-[^"]+')" echo "${BINARY}: ${INTEGRITY}" sed -i "s|\"${BINARY}\": \"\",|\"${BINARY}\": \"${INTEGRITY}\",|" MODULE.bazel done # Upload all binaries for TARGET in $(bazelisk query 'upload:*' | tail -n +2); do bazelisk run "${TARGET}" done ``` # Release `semantic-release` performs automatic releases of the project. Release channels for `alpha`, `beta` and `stable` releases are used. The [upstream configuration usage guide][semrel-release-channels-usage] provides information on how to perform a release. [semrel-release-channels-usage]: https://gitlab.arm.com/semantic-release/config-release-channels/-/blob/main/README.md?ref_type=heads#usage [contributions guide]: https://gitlab.arm.com/documentation/contributions#contributions [Fork]: https://docs.gitlab.com/ee/user/project/repository/forking_workflow.html#create-a-fork [Create merge request]: https://docs.gitlab.com/ee/user/project/repository/forking_workflow.html#merge-changes-back-upstream