-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #261 from canonical/automated-versioning-scheme
Automate versioning scheme for the client cargo and Debian packages
- Loading branch information
Showing
7 changed files
with
105 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,9 +110,12 @@ installed on your system: | |
sudo apt-get install -y debhelper dh-cargo devscripts | ||
``` | ||
|
||
### Building the rust lib | ||
### Creating a new version | ||
|
||
First, generate update to the changelog file using the `dch` tool: | ||
To create a new version of the client package, follow these steps: | ||
|
||
1. Update the Changelog | ||
Generate update to the changelog file using the `dch` tool: | ||
|
||
```bash | ||
export [email protected] | ||
|
@@ -121,7 +124,46 @@ dch -i # increment release number | |
dch -r # create release | ||
``` | ||
|
||
Then you need to vendor the Rust dependencies: | ||
2. Versioning Scheme | ||
|
||
We follow the `MAJOR.MINOR.PATCH` semantic versioning convention for | ||
this package: | ||
|
||
* `MAJOR`: Incremented for incompatible API changes or significant functionality updates. | ||
* `MINOR`: Incremented for backward-compatible feature additions. | ||
* `PATCH`: Incremented for backward-compatible bug fixes. | ||
|
||
|
||
For pre-releases targeted at a PPA, append the `~ppaN` suffix to the | ||
version, where `N` represents the build number (e.g., `1.2.3~ppa1`). Once | ||
the package is approved for publication to the main repository, remove | ||
the `~ppaN` suffix to finalize the version. | ||
|
||
3. Create a Matching Git Tag | ||
|
||
Ensure the version is correctly tagged in Git. The tag should follow | ||
the format `vMAJOR.MINOR.PATCH` and must be annotated to the same | ||
commit as the changelog entry: | ||
|
||
``` | ||
git tag -a v1.2.3 <commit_hash> | ||
git push origin v1.2.3 | ||
``` | ||
|
||
4. Update Cargo Versions | ||
|
||
If the new version includes changes to the MAJOR, MINOR, or PATCH | ||
version numbers, update the version fields in the following files: | ||
|
||
* `hwlib/Cargo.toml` | ||
* `hwctl/Cargo.toml` | ||
|
||
Make sure to commit these changes along with the updated changelog. | ||
|
||
### Building the client package | ||
|
||
After generating a new version, you need to vendor the Rust | ||
dependencies: | ||
|
||
```bash | ||
./debian/vendor-rust.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
rust-hwlib (0.9.0~ppa1) oracular; urgency=medium | ||
|
||
* Release 0.9.0 version of the client. | ||
* Fix error-handling in hwctl. | ||
|
||
-- Nadzeya Hutsko <[email protected]> Tue, 10 Dec 2024 16:40:46 +0200 | ||
|
||
rust-hwlib (0.0.1~ppa3) oracular; urgency=medium | ||
|
||
* Provide both hwlib library and hwctl CLI tool. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
name = "hwlib" | ||
description = "Collects and sends hardware information to hwapi to find testing status of the device model" | ||
license = "GPL-3.0-only" | ||
version = "0.1.0" | ||
version = "0.9.0" | ||
edition = "2021" | ||
authors = [ | ||
"Canonical Hardware Certification <[email protected]>", | ||
|