diff --git a/README.md b/README.md index 0189cad..8fc0de4 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,20 @@ The development environment is [devenv](https://devenv.sh): direnv with `.envrc` and `cargo clippy --all-targets` work there, `devenv test` runs both, and `vm-test` runs the NixOS VM test (needs KVM). See [`AGENTS.md`](AGENTS.md) for conventions. +## Releasing + +Use SemVer for the CLI, request protocol and Nix module options. Bump the patch for +compatible fixes and the minor for compatible features. While the major is zero, +use a minor bump for breaking changes and document how to upgrade. After `1.0.0`, +bump the major for breaking changes. + +1. Set `package.version` in `Cargo.toml` and run `cargo check` to refresh + `Cargo.lock`. The Nix package reads the version from `Cargo.toml`. +2. After the release commit lands on `main` and passes CI, tag it `v` and + push the tag. Keep published tags fixed. +3. Update the `slop-broker` input in nixfiles to `ref=refs/tags/v` and run + `nix flake update slop-broker` there to refresh its lock entry. + ## License MIT; see [`LICENSE`](LICENSE). diff --git a/nix/package.nix b/nix/package.nix index d9d9e6e..8065442 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -4,7 +4,7 @@ let in rustPlatform.buildRustPackage { pname = "slop-broker"; - version = "0.1.0"; + inherit ((builtins.fromTOML (builtins.readFile ../Cargo.toml)).package) version; src = toSource { root = ../.;