diff --git a/COMPAT.md b/COMPAT.md index e7fb11c..3544750 100644 --- a/COMPAT.md +++ b/COMPAT.md @@ -2,6 +2,7 @@ | zig-common | Zig | tools built on it | |---|---|---| +| 0.11.0 | 0.17.1 | eb-keep-logs and eessi-arch-guard on their next releases (`syslog`: the RFC 5424 and journald emitter each carried a copy of); eb-keep-logs builds against it in CI | | 0.10.0 | 0.17.1 | eessi-arch-guard and eb-staged-rebuild (`fsx.mkdtemp`, `fsx.normPath`, `fsx.absPath`); eb-keep-logs builds against it in CI | | 0.9.0 | 0.17.1 | eessi-arch-guard on its next release (proc.killGroup); eb-keep-logs builds against it in CI | | 0.8.1 | 0.17.1 | eb-staged-rebuild, eb-keep-logs and eessi-arch-guard on their next releases (umask read without changing it, std names without deprecated aliases) | diff --git a/RELEASING.md b/RELEASING.md index 336da21..f1063aa 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -2,11 +2,17 @@ A release is an annotated tag `vX.Y.Z` on `main`; there are no binaries. -1. `.version` in `build.zig.zon` names the new version. -2. CI on `main` is green, including the `tools` job that builds every tool +1. Branch from `main`: `git switch -c chore/release-X.Y.Z origin/main`. +2. `COMPAT.md` gets a row for the version: the Zig version and the tool + versions built on it. Commit it with a `changelog.d` fragment. +3. `cog bump --minor` (or `--patch`, `--major`, `--version X.Y.Z`). The hooks + of `cog.toml` set `.version` in `build.zig.zon` and refuse a version with + no `COMPAT.md` row; cog commits `chore(version): vX.Y.Z` and creates the + tag on that commit. +4. Push the branch, open the pull request, and merge it with a merge commit + once CI is green, including the `tools` job that builds every tool against this commit. -3. `COMPAT.md` has a row for the version: the Zig version and the tool - versions built on it. -4. Tag and push: `git tag -a vX.Y.Z -m vX.Y.Z && git push origin vX.Y.Z`. -5. Each tool moves to the tag in a commit of its own: +5. Sign and push the tag: + `git tag -s -f vX.Y.Z -m vX.Y.Z 'vX.Y.Z^{}' && git push origin vX.Y.Z`. +6. Each tool moves to the tag in a commit of its own: `zig fetch --save git+https://github.com/stackhands/zig-common#vX.Y.Z`. diff --git a/build.zig.zon b/build.zig.zon index 2ba858a..bf27e9d 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,6 +1,6 @@ .{ .name = .zig_common, - .version = "0.10.0", + .version = "0.11.0", .fingerprint = 0xa9bcabd6798f1690, .minimum_zig_version = "0.17.1", .dependencies = .{}, diff --git a/changelog.d/+release-0.11.0.misc.md b/changelog.d/+release-0.11.0.misc.md new file mode 100644 index 0000000..2f5905b --- /dev/null +++ b/changelog.d/+release-0.11.0.misc.md @@ -0,0 +1 @@ +Prepare `zig-common` `0.11.0` in `COMPAT.md` for callers adopting `syslog`. A release is now `cog bump` on a release branch: `cog.toml` sets the version in `build.zig.zon` and refuses a version without a `COMPAT.md` row. diff --git a/cog.toml b/cog.toml new file mode 100644 index 0000000..8cf826d --- /dev/null +++ b/cog.toml @@ -0,0 +1,13 @@ +# `cog bump --minor` (or --patch, --major, --version X.Y.Z) on a release branch +# sets the version in build.zig.zon, commits `chore(version): vX.Y.Z` and +# creates the tag on that commit. RELEASING.md has the steps around it. +tag_prefix = "v" +ignore_merge_commits = true +# CHANGELOG.md is built by towncrier from changelog.d/. +disable_changelog = true +branch_whitelist = ["chore/release-*"] + +pre_bump_hooks = [ + "sed -i 's/^\\( *\\.version = \\)\"[0-9.]*\",$/\\1\"{{version}}\",/' build.zig.zon", + "grep -q '^| {{version}} |' COMPAT.md", +]