Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6c6e97707 | ||
|
|
c976621357 | ||
|
|
919b328e93 | ||
|
|
7641622e8d |
22
flake.nix
22
flake.nix
@@ -156,6 +156,26 @@
|
|||||||
# Unified list processed in declaration order:
|
# Unified list processed in declaration order:
|
||||||
# { file = "path/to/file"; content = ''...$FULL_VERSION...''; } # write file
|
# { file = "path/to/file"; content = ''...$FULL_VERSION...''; } # write file
|
||||||
# { run = ''...shell snippet...''; } # run script
|
# { 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.
|
# Runtime env includes: BASE_VERSION, CHANNEL, PRERELEASE_NUM, FULL_VERSION, FULL_TAG.
|
||||||
channels ? [
|
channels ? [
|
||||||
"alpha"
|
"alpha"
|
||||||
@@ -228,7 +248,7 @@
|
|||||||
release = [
|
release = [
|
||||||
{
|
{
|
||||||
run = ''
|
run = ''
|
||||||
sed -E -i "s#^([[:space:]]*devshell-lib\\.url = \")git\\+https://git\\.dgren\\.dev/eric/nix-flake-lib[^"]*(\";)#\\1git+https://git.dgren.dev/eric/nix-flake-lib?ref=$FULL_TAG\\2#" "$ROOT_DIR/template/flake.nix"
|
sed -E -i "s#^([[:space:]]*devshell-lib\\.url = \")git\\+https://git\\.dgren\\.dev/eric/nix-flake-lib[^\"]*(\";)#\\1git+https://git.dgren.dev/eric/nix-flake-lib?ref=$FULL_TAG\\2#" "$ROOT_DIR/template/flake.nix"
|
||||||
log "Updated template/flake.nix devshell-lib ref to $FULL_TAG"
|
log "Updated template/flake.nix devshell-lib ref to $FULL_TAG"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
devshell-lib.url = "git+https://git.dgren.dev/eric/nix-flake-lib?ref=v0.0.2";
|
devshell-lib.url = "git+https://git.dgren.dev/eric/nix-flake-lib?ref=v0.0.5";
|
||||||
devshell-lib.inputs.nixpkgs.follows = "nixpkgs";
|
devshell-lib.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
|
|
||||||
formatter = forAllSystems (system: (devshell-lib.lib.mkDevShell { inherit system; }).formatter);
|
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:
|
# The release script always updates VERSION first, then:
|
||||||
# 1) runs release steps in order (file writes and scripts)
|
# 1) runs release steps in order (file writes and scripts)
|
||||||
|
|||||||
Reference in New Issue
Block a user