diff --git a/flake.nix b/flake.nix index 9cee677..1dd9404 100644 --- a/flake.nix +++ b/flake.nix @@ -156,6 +156,26 @@ # Unified list processed in declaration order: # { file = "path/to/file"; content = ''...$FULL_VERSION...''; } # write file # { run = ''...shell snippet...''; } # run script + # Example: + # release = [ + # { + # file = "src/version.ts"; + # content = ''export const APP_VERSION = "$FULL_VERSION" as const;''; + # } + # { + # file = "internal/version/version.go"; + # content = '' + # package version + # + # const Version = "$FULL_VERSION" + # ''; + # } + # { + # run = '' + # sed -E -i "s#^([[:space:]]*my-lib\\.url = \")github:org/my-lib[^"]*(\";)#\\1github:org/my-lib?ref=$FULL_TAG\\2#" "$ROOT_DIR/flake.nix" + # ''; + # } + # ]; # Runtime env includes: BASE_VERSION, CHANNEL, PRERELEASE_NUM, FULL_VERSION, FULL_TAG. channels ? [ "alpha" diff --git a/template/flake.nix b/template/flake.nix index 0cb9224..86198ed 100644 --- a/template/flake.nix +++ b/template/flake.nix @@ -97,7 +97,7 @@ formatter = forAllSystems (system: (devshell-lib.lib.mkDevShell { inherit system; }).formatter); - # Optional: release command (nix run .#release) + # Optional: release command (`release`) # # The release script always updates VERSION first, then: # 1) runs release steps in order (file writes and scripts)