diff --git a/CHANGELOG.md b/CHANGELOG.md index c214e12..b4c53a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,18 +9,43 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- User and group management via [userborn](https://github.com/nikstur/userborn) integration (#266) +- Secrets management via [sops-nix](https://github.com/Mic92/sops-nix) integration (#270) +- Container test driver with Ubuntu support, testinfra integration, interactive debugging (#333) +- Default value for `--flake` CLI option set to `~/.config/system-manager/flake.nix` (#326) +- `target_host` is now global CLI argument (#340) +- Speed up system-manager build using Numtide cache substituter (#337) - Support running system-manager from macOS to deploy configurations to Linux (#325) +- Reduce the number of flake inputs using a sub-flake (#329) ### Fixed -- Remove eval warnings (#324) +- Remove unused .mode/.uid/.gid sidecar files from etc static environment (#344) +- Remove multiple eval warnings ### Documentation - Reorganize documentation with tutorials, how-to guides, explanations, and reference pages +- Update Nix installation instructions to recommend nix-installer +- Add users, groups example and documentation +- Add container test driver documentation +- Improve remote deployment documentation - Add CONTRIBUTING.md with developer guidelines - Add supported platforms reference page - Add file permissions and ownership reference +- Auto-generated module options reference integrated into MkDocs + +### Contributors + +Thanks to all the contributors who made this release possible: + +- Aaron Honeycutt +- David Chocholatý +- Francisco-Andre-Martins +- Jean-François Roche +- Jeffrey Cogswell +- Jonas Chevalier +- Julien Malka ## [1.0.0] - 2026-01-06 @@ -103,5 +128,6 @@ Thanks to all the contributors who made this release possible: - Steve Dodd - Yvan Sraka -[unreleased]: https://github.com/numtide/system-manager/compare/v1.0.0...HEAD +[unreleased]: https://github.com/numtide/system-manager/compare/v1.1.0...HEAD +[1.1.0]: https://github.com/numtide/system-manager/compare/v1.0.0...v1.1.0 [1.0.0]: https://github.com/numtide/system-manager/releases/tag/v1.0.0 diff --git a/tools/release.sh b/tools/release.sh index 0e2ff9f..4e55eea 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -8,10 +8,23 @@ if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then exit 1 fi +VERSION_NUM="${VERSION#v}" CHANGELOG="CHANGELOG.md" +CARGO_TOML="Cargo.toml" TEMP_NOTES=$(mktemp) +TEMP_CHANGELOG=$(mktemp) -trap 'rm -f "$TEMP_NOTES"' EXIT +trap 'rm -f "$TEMP_NOTES" "$TEMP_CHANGELOG"' EXIT + +CURRENT_VERSION=$(grep -E '^version = "[0-9]+\.[0-9]+\.[0-9]+"' "$CARGO_TOML" | head -1 | sed 's/.*"\([^"]*\)".*/\1/') +if [[ -z "$CURRENT_VERSION" ]]; then + echo "Error: Could not determine current version from $CARGO_TOML" >&2 + exit 1 +fi + +echo "Current version: $CURRENT_VERSION" +echo "New version: $VERSION_NUM" +echo "" echo "Extracting release notes from $CHANGELOG..." awk '/^## \[Unreleased\]/,/^## \[[0-9]/ { @@ -30,16 +43,47 @@ echo "Release notes:" cat "$TEMP_NOTES" echo "" -read -p "Create tag and draft release $VERSION? [y/N] " -n 1 -r +read -p "Create release $VERSION? [y/N] " -n 1 -r echo if [[ ! $REPLY =~ ^[Yy]$ ]]; then echo "Aborted." exit 1 fi +echo "Updating $CARGO_TOML version to $VERSION_NUM..." +sed -i "s/^version = \"$CURRENT_VERSION\"/version = \"$VERSION_NUM\"/" "$CARGO_TOML" + +echo "Updating Cargo.lock..." +cargo check --quiet 2>/dev/null || cargo update --quiet + +echo "Updating $CHANGELOG..." +TODAY=$(date +%Y-%m-%d) + +awk -v version="$VERSION_NUM" -v date="$TODAY" ' +/^## \[Unreleased\]/ { + print "## [Unreleased]" + print "" + print "## [" version "] - " date + next +} +{ print } +' "$CHANGELOG" > "$TEMP_CHANGELOG" + +sed -i "s|\[unreleased\]: https://github.com/numtide/system-manager/compare/v[0-9.]*\.\.\.HEAD|[unreleased]: https://github.com/numtide/system-manager/compare/v$VERSION_NUM...HEAD|" "$TEMP_CHANGELOG" + +if ! grep -q "^\[$VERSION_NUM\]:" "$TEMP_CHANGELOG"; then + sed -i "/^\[unreleased\]:/a [$VERSION_NUM]: https://github.com/numtide/system-manager/compare/v$CURRENT_VERSION...v$VERSION_NUM" "$TEMP_CHANGELOG" +fi + +mv "$TEMP_CHANGELOG" "$CHANGELOG" + +echo "Committing version updates..." +git add "$CARGO_TOML" Cargo.lock "$CHANGELOG" +git commit -m "chore: bump version to $VERSION_NUM" + echo "Creating git tag $VERSION..." git tag -a "$VERSION" -m "Release $VERSION" -git push origin "$VERSION" +git push origin HEAD "$VERSION" echo "Creating GitHub draft release..." gh release create "$VERSION" \ @@ -47,9 +91,9 @@ gh release create "$VERSION" \ --title "system-manager $VERSION" \ --notes-file "$TEMP_NOTES" -echo "✓ Draft release $VERSION created successfully!" +echo "" +echo "Release $VERSION created successfully!" echo "" echo "Next steps:" echo "1. Review the draft release on GitHub" echo "2. Publish the release when ready" -echo "3. Update CHANGELOG.md to move [Unreleased] content to [$VERSION] section"