Merge branch 'release/0.2.17'
This commit is contained in:
commit
ba9c9f6a7a
5 changed files with 100 additions and 14 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.2.16"
|
version = "0.2.17"
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
|
||||||
6
container/flake.lock
generated
6
container/flake.lock
generated
|
|
@ -2,11 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1779467186,
|
"lastModified": 1780511130,
|
||||||
"narHash": "sha256-nOesoDCiXcUftqbRBMz9tt4blI5PvljMWbm3kuCA+0s=",
|
"narHash": "sha256-2v9lT4ya59Lh1FqPeLnz1MoX9y/wz2huqfe9RtQZITk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b77b3de8775677f84492abe84635f87b0e153f0f",
|
"rev": "535f3e6942cb1cead3929c604320d3db54b542b9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
64
devenv.lock
64
devenv.lock
|
|
@ -17,6 +17,62 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1767039857,
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"git-hooks": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"gitignore": "gitignore",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1778507602,
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"rev": "61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gitignore": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"git-hooks",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1762808025,
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1779102034,
|
"lastModified": 1779102034,
|
||||||
|
|
@ -52,11 +108,15 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"devenv": "devenv",
|
"devenv": "devenv",
|
||||||
|
"git-hooks": "git-hooks",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-cmake3": "nixpkgs-cmake3"
|
"nixpkgs-cmake3": "nixpkgs-cmake3",
|
||||||
|
"pre-commit-hooks": [
|
||||||
|
"git-hooks"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
"version": 7
|
"version": 7
|
||||||
}
|
}
|
||||||
|
|
|
||||||
13
flake.nix
13
flake.nix
|
|
@ -36,6 +36,11 @@
|
||||||
cargo = rustToolchain;
|
cargo = rustToolchain;
|
||||||
rustc = rustToolchain;
|
rustc = rustToolchain;
|
||||||
};
|
};
|
||||||
|
frontendCargoDeps = rustPlatform.fetchCargoVendor {
|
||||||
|
src = ./.;
|
||||||
|
name = "trictrac-frontend-vendor";
|
||||||
|
hash = "sha256-XBxdRT/f69GDfVc18/DnnAiY1vjMGMWfcYot0K0jevg=";
|
||||||
|
};
|
||||||
# Must match the wasm-bindgen version in Cargo.lock
|
# Must match the wasm-bindgen version in Cargo.lock
|
||||||
wasm-bindgen-version = "0.2.118";
|
wasm-bindgen-version = "0.2.118";
|
||||||
# wasm-bindgen-version = "0.2.121";
|
# wasm-bindgen-version = "0.2.121";
|
||||||
|
|
@ -52,12 +57,6 @@
|
||||||
# hash = "sha256-DPdCDPTAPBrbqLUqnCwQu1dePs9lGg85JCJOCIr9qjU=";
|
# hash = "sha256-DPdCDPTAPBrbqLUqnCwQu1dePs9lGg85JCJOCIr9qjU=";
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
|
|
||||||
frontendCargoDeps = rustPlatform.fetchCargoVendor {
|
|
||||||
src = ./.;
|
|
||||||
name = "trictrac-frontend-vendor";
|
|
||||||
hash = "sha256-R75zHXKhv0nkBv6U24ZCAtwp1yaSbr0bFywWQHwhSkM=";
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
final.stdenv.mkDerivation {
|
final.stdenv.mkDerivation {
|
||||||
name = "trictrac-front";
|
name = "trictrac-front";
|
||||||
|
|
@ -103,7 +102,7 @@
|
||||||
|
|
||||||
trictrac = with final; rustPlatform.buildRustPackage {
|
trictrac = with final; rustPlatform.buildRustPackage {
|
||||||
pname = "trictrac";
|
pname = "trictrac";
|
||||||
version = "0.2.16"; # trictrac-version
|
version = "0.2.17"; # trictrac-version
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
|
|
|
||||||
29
justfile
29
justfile
|
|
@ -9,9 +9,36 @@ bump version:
|
||||||
git flow release start {{version}}
|
git flow release start {{version}}
|
||||||
sed -i '/^\[workspace\.package\]/,/^\[/{s/^version = ".*"/version = "{{version}}"/}' Cargo.toml
|
sed -i '/^\[workspace\.package\]/,/^\[/{s/^version = ".*"/version = "{{version}}"/}' Cargo.toml
|
||||||
sed -i 's/version = "[0-9.]*"; # trictrac-version/version = "{{version}}"; # trictrac-version/' flake.nix
|
sed -i 's/version = "[0-9.]*"; # trictrac-version/version = "{{version}}"; # trictrac-version/' flake.nix
|
||||||
|
just frontend-flake-hash
|
||||||
git add Cargo.toml flake.nix
|
git add Cargo.toml flake.nix
|
||||||
git commit -m "chore: bump version to {{version}}"
|
git commit -m "chore: bump version to {{version}}"
|
||||||
@echo "Done. Finish with: git flow release finish {{version}}"
|
@echo "Done. Finish with: `git flow release finish {{version}}`"
|
||||||
|
|
||||||
|
# Get new trictrac front-end nix package hash and update flake.nix with it
|
||||||
|
frontend-flake-hash:
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
FAKE_HASH="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
|
||||||
|
# Match only non-commented hash lines (i.e. lines where 'hash' is the first non-space token)
|
||||||
|
CURRENT_HASH=$(grep -P '^\s+hash = "' flake.nix | grep -oP 'sha256-[^"]+' | head -1)
|
||||||
|
echo "Current hash: $CURRENT_HASH"
|
||||||
|
sed -i "s|$CURRENT_HASH|$FAKE_HASH|" flake.nix
|
||||||
|
set +e
|
||||||
|
OUTPUT=$(nix build .#trictrac-front --no-link 2>&1)
|
||||||
|
set -e
|
||||||
|
NEW_HASH=$(echo "$OUTPUT" | grep -oP 'got:\s+\Ksha256-\S+' || true)
|
||||||
|
if [ -n "$NEW_HASH" ]; then
|
||||||
|
sed -i "s|$FAKE_HASH|$NEW_HASH|" flake.nix
|
||||||
|
if [ "$NEW_HASH" = "$CURRENT_HASH" ]; then
|
||||||
|
echo "Hash already up to date: $CURRENT_HASH"
|
||||||
|
else
|
||||||
|
echo "Updated: $CURRENT_HASH → $NEW_HASH"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
sed -i "s|$FAKE_HASH|$CURRENT_HASH|" flake.nix
|
||||||
|
printf "Unexpected build output (no hash mismatch found):\n%s\n" "$OUTPUT" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Sync pages content to production server
|
# Sync pages content to production server
|
||||||
pages-deploy:
|
pages-deploy:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue