This document outlines the steps for releasing a new version of Bollard. Follow these instructions carefully to ensure a smooth release process.
- Navigate to
./codegen/proto. - Check for transient dependency updates between
bollardandbollard-buildkit-proto(e.g.,tonic). - Run the following commands to fetch and generate the latest protobuf files:
cargo run --bin fetch --features fetch cargo run --bin gen --features build
- Verify that the build succeeds:
- In the project root, attempt a build with the
buildkitfeature enabled. - Temporarily add a path dependency in
Cargo.tomland update related transient dependencies to test the changes. - Important: Revert any path dependency and ensure version alignment in
Cargo.tomlbefore submitting a pull request.
- In the project root, attempt a build with the
- Merge the pull request and reset the
masterbranch. - Package and publish the crate:
cargo package cargo publish
- Create a PR and merge the changes.
- Navigate to
./codegen/swagger. - Check for transient dependency updates between
bollardandbollard-buildkit-proto(e.g.,chrono). - Identify the latest released API version:
- Check the latest release tag on the Moby GitHub repository.
- Locate the most recent API documentation in
./docs/api. - Copy the raw download URL and update
./codegen/swagger/pom.xmlaccordingly.
- Update the
packageVersionfield:- The first two numbers represent the Moby API version.
- The third number corresponds to Bollard's internal codegen version.
- The digits following
rcmatch the Moby release tag. - Format:
[API-major].[API-minor].[bollard-codegen-version]-rc.[moby-tag-major][moby-tag-minor].[moby-tag-patch].
- Modify
Cargo.mustacheto reference the newbollard-buildkit-protoversion. - Generate the new Swagger bindings:
mvn -D org.slf4j.simpleLogger.defaultLogLevel=warn clean compiler:compile generate-resources
- Validate the build:
- Run a build in the root directory.
- Temporarily add a path dependency in
Cargo.tomlto verify correctness.
- Merge the pull request and reset the
masterbranch. - Package and publish the crate:
cargo package cargo publish
- Create a PR and merge the changes.
- Update
Cargo.toml:- Modify dependencies to point to the latest versions of
bollard-buildkit-protoandbollard-stubs.
- Modify dependencies to point to the latest versions of
- Update
lib.rsanddocker.rsto match the new API version if changes were made in the Swagger release. - Modify
lib.rswith any relevant documentation updates. - Regenerate the README:
cargo readme --no-title > README.md
- Bump the crate version as necessary.
- Package and publish the release:
cargo package cargo publish
- Create a GitHub Release tag (this should be autogenerated).
Following these steps ensures consistency and reliability when publishing new versions of Bollard. If any issues arise, review the steps carefully or consult the project maintainers for guidance.