diff --git a/Cargo.toml b/Cargo.toml index 7897d03..52537ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "0.2.17" +version = "0.2.16" [workspace] resolver = "2" diff --git a/container/flake.lock b/container/flake.lock index d315022..d81bd13 100644 --- a/container/flake.lock +++ b/container/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1780511130, - "narHash": "sha256-2v9lT4ya59Lh1FqPeLnz1MoX9y/wz2huqfe9RtQZITk=", + "lastModified": 1779467186, + "narHash": "sha256-nOesoDCiXcUftqbRBMz9tt4blI5PvljMWbm3kuCA+0s=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "535f3e6942cb1cead3929c604320d3db54b542b9", + "rev": "b77b3de8775677f84492abe84635f87b0e153f0f", "type": "github" }, "original": { diff --git a/devenv.lock b/devenv.lock index 3f0905b..e6e8ef6 100644 --- a/devenv.lock +++ b/devenv.lock @@ -17,62 +17,6 @@ "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": { "locked": { "lastModified": 1779102034, @@ -108,15 +52,11 @@ "root": { "inputs": { "devenv": "devenv", - "git-hooks": "git-hooks", "nixpkgs": "nixpkgs", - "nixpkgs-cmake3": "nixpkgs-cmake3", - "pre-commit-hooks": [ - "git-hooks" - ] + "nixpkgs-cmake3": "nixpkgs-cmake3" } } }, "root": "root", "version": 7 -} +} \ No newline at end of file diff --git a/flake.nix b/flake.nix index 89d3586..a256857 100644 --- a/flake.nix +++ b/flake.nix @@ -36,11 +36,6 @@ cargo = 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 wasm-bindgen-version = "0.2.118"; # wasm-bindgen-version = "0.2.121"; @@ -57,6 +52,12 @@ # hash = "sha256-DPdCDPTAPBrbqLUqnCwQu1dePs9lGg85JCJOCIr9qjU="; # }; # }; + + frontendCargoDeps = rustPlatform.fetchCargoVendor { + src = ./.; + name = "trictrac-frontend-vendor"; + hash = "sha256-R75zHXKhv0nkBv6U24ZCAtwp1yaSbr0bFywWQHwhSkM="; + }; in final.stdenv.mkDerivation { name = "trictrac-front"; @@ -102,7 +103,7 @@ trictrac = with final; rustPlatform.buildRustPackage { pname = "trictrac"; - version = "0.2.17"; # trictrac-version + version = "0.2.16"; # trictrac-version src = ./.; nativeBuildInputs = [ pkg-config ]; diff --git a/justfile b/justfile index 6f39fa5..3ae77d1 100644 --- a/justfile +++ b/justfile @@ -9,36 +9,9 @@ bump version: git flow release start {{version}} sed -i '/^\[workspace\.package\]/,/^\[/{s/^version = ".*"/version = "{{version}}"/}' Cargo.toml 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 commit -m "chore: bump version to {{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 + @echo "Done. Finish with: git flow release finish {{version}}" # Sync pages content to production server pages-deploy: