Skip to content

Commit

Permalink
Release v0.34.0 (#1394)
Browse files Browse the repository at this point in the history
* Update Cargo.toml and fixtures to v0.34.0

* Update Cargo.lock prior to v0.34.0

* flake.lock: Update

Flake lock file updates:

• Updated input 'nixpkgs':
    'https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.737779%2Brev-9abb87b552b7f55ac8916b6fc9e5cb486656a2f3/019463c0-2408-72ce-9579-5965e6e5e05b/source.tar.gz?narHash=sha256-qwpCtZhSsSNQtK4xYGzMiyEDhkNzOCz/Vfu4oL2ETsQ%3D' (2025-01-13)
  → 'https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.738172%2Brev-eb62e6aa39ea67e0b8018ba8ea077efe65807dc8/01946c30-5ff9-7d30-acd1-28101cd9be64/source.tar.gz?narHash=sha256-uQ%2BNQ0/xYU0N1CnXsa2zghgNaOPxWpMJXSUJJ9W7140%3D' (2025-01-14)

* Add prepare-release.sh

* checkout -b -> checkout -B

* Update Cargo.lock first, then Cargo.toml

* Use toml-cli for updating Cargo.toml

* fixup: correct order and update commit messages

---------

Co-authored-by: Cole Helbling <[email protected]>
  • Loading branch information
grahamc and cole-h authored Jan 16, 2025
1 parent d7de0e4 commit 9c5542a
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 20 deletions.
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,21 +348,21 @@ You can also remove your `$HOME/nix-installer-wsl-tests-temp` folder whenever yo

This package uses [Semantic Versioning](https://semver.org/). When determining the version number for a new release refer to Semantic Versioning for guidance. You can use the `check-semver` command alias from within the development environment to validate your changes don't break semver.

To cut a release:
To cut a release, run `./prepare-release.sh 0.0.1`.
This script will:

- Create a release branch from `main` (`git checkout -b release-v0.0.1`)
- Release PRs should not contain any installer-related changes which require review
- Ensure the `flake.lock`, `Cargo.lock`, and Rust dependencies are up-to-date with the following:
- `nix flake update --commit-lock-file`
- `cargo update --aggressive`
- `cargo outdated --ignore-external-rel --aggressive`
- Ensure the VM / container tests still pass with the following:
- NOTE: At time of writing, these are run in CI on release branches
- Update the versions in the fixture data in `test/fixtures/**/*.json`
- Push the branch, create a PR ("Release v0.0.1").
This pull request will automatically run VM and container tests:
- `nix flake check -L`
- `nix build .#hydraJobs.container-test.all.x86_64-linux.all -L -j 6`
- `nix build .#hydraJobs.vm-test.all.x86_64-linux.all -L -j 6`
- Update the versions in the fixture data in `test/fixtures/**/*.json`
- Push the branch, create a PR ("Release v0.0.1")
- Once the PR tests pass and it has been reviewed, merge it
- Checkout the `main` branch and `git pull`
- Prepare a draft release that creates the new tag on publish
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "nix-installer"
description = "The Determinate Nix Installer"
version = "0.33.0"
version = "0.34.0"
edition = "2021"
resolver = "2"
license = "LGPL-2.1"
Expand Down
10 changes: 5 additions & 5 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
check.check-semver
check.check-clippy
editorconfig-checker
toml-cli
]
++ lib.optionals (pkgs.stdenv.isLinux) (with pkgs; [
checkpolicy
Expand Down
41 changes: 41 additions & 0 deletions prepare-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/sh

set -eux

version=$1

if ! echo "$version" | grep -q "^[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+$"; then
echo "argv[1] needs to be a version, in x.y.z format."
exit 1
fi

git fetch
git checkout origin/main
git checkout -B "release-v$version"

nix flake update --commit-lock-file

cargo update --aggressive
git add Cargo.lock
git commit -m "Update Cargo.lock dependencies"

toml set ./Cargo.toml package.version "$version" > Cargo.toml.next
mv Cargo.toml.next Cargo.toml
git add Cargo.toml

cargo fetch
git add Cargo.lock

for fname in $(find ./tests/fixtures -name '*.json'); do
cat "$fname" \
| jq '.version = $version | .diagnostic_data.version = $version' --arg version "$version" \
> "$fname.next"
mv "$fname.next" "$fname"
git add "$fname"
done

git commit -m "Release v$version"

cargo outdated --ignore-external-rel --aggressive

echo "Complete"
4 changes: 2 additions & 2 deletions tests/fixtures/linux/linux.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.33.0",
"version": "0.34.0",
"actions": [
{
"action": {
Expand Down Expand Up @@ -1164,7 +1164,7 @@
},
"diagnostic_data": {
"attribution": null,
"version": "0.33.0",
"version": "0.34.0",
"planner": "linux",
"configured_settings": [],
"os_name": "Ubuntu",
Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/linux/steam-deck.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.33.0",
"version": "0.34.0",
"actions": [
{
"action": {
Expand Down Expand Up @@ -1224,7 +1224,7 @@
},
"diagnostic_data": {
"attribution": null,
"version": "0.33.0",
"version": "0.34.0",
"planner": "steam-deck",
"configured_settings": [],
"os_name": "SteamOS",
Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/macos/macos.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.33.0",
"version": "0.34.0",
"actions": [
{
"action": {
Expand Down Expand Up @@ -1266,7 +1266,7 @@
},
"diagnostic_data": {
"attribution": null,
"version": "0.33.0",
"version": "0.34.0",
"planner": "macos",
"configured_settings": [],
"os_name": "unknown",
Expand Down

0 comments on commit 9c5542a

Please sign in to comment.