mirror of
https://github.com/moeru-ai/airi.git
synced 2026-08-14 00:48:06 +00:00
chore(nix/flake): update lock (#577)
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
name: Update Nix assets Hash
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'apps/stage-tamagotchi/package.json'
|
||||
- 'apps/stage-tamagotchi/vite.config.ts'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
update:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: cachix/install-nix-action@v31
|
||||
with:
|
||||
extra_nix_config: experimental-features = nix-command flakes
|
||||
|
||||
- name: Update Hash
|
||||
run: nix/update-assets-hash.sh
|
||||
|
||||
- uses: stefanzweifel/git-auto-commit-action@v6
|
||||
with:
|
||||
commit_message: 'chore(nix): update assets hash'
|
||||
commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
|
||||
Generated
+3
-3
@@ -2,11 +2,11 @@
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1755186698,
|
||||
"narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=",
|
||||
"lastModified": 1757487488,
|
||||
"narHash": "sha256-zwE/e7CuPJUWKdvvTCB7iunV4E/+G0lKfv4kk/5Izdg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c",
|
||||
"rev": "ab0f3607a6c7486ea22229b92ed2d355f1482ee0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
sha256-QDGx5sWlWwgMWvG/umkNY+Ct9i5zl+eKEJnvA2whPkY=
|
||||
+2
-3
@@ -27,7 +27,7 @@
|
||||
|
||||
rustPlatform.buildRustPackage (final: {
|
||||
pname = "airi";
|
||||
version = "0.7.2-beta.2";
|
||||
version = "0.7.2-beta.3";
|
||||
|
||||
src = ../.;
|
||||
|
||||
@@ -72,8 +72,7 @@ rustPlatform.buildRustPackage (final: {
|
||||
'';
|
||||
|
||||
outputHashMode = "recursive";
|
||||
# To update, set it to lib.fakeHash
|
||||
outputHash = "sha256-QDGx5sWlWwgMWvG/umkNY+Ct9i5zl+eKEJnvA2whPkY=";
|
||||
outputHash = builtins.readFile ./assets-hash.txt;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
# Set fake hash to trigger rebuild
|
||||
echo -n "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" > assets-hash.txt
|
||||
# Redirect stderr to stdout for grep while keeping printing on stderr
|
||||
HASH=$(nix build ..#airi.assets 2> >(tee /dev/tty) | grep -oP 'got: +\K\S+')
|
||||
echo -n $HASH > assets-hash.txt
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
set -eux
|
||||
|
||||
ROOT="$(dirname "$(readlink -f "$0")")"
|
||||
|
||||
:> "$ROOT/pnpm-deps-hash.txt" # Clear hash
|
||||
HASH=$(nix build "$ROOT/..#airi.pnpmDeps" |& grep -oP 'got: +\K\S+')
|
||||
echo -n $HASH > "$ROOT/pnpm-deps-hash.txt"
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
:> pnpm-deps-hash.txt # Clear hash to trigger rebuild
|
||||
# Redirect stderr to stdout for grep while keeping printing on stderr
|
||||
HASH=$(nix build ..#airi.pnpmDeps 2> >(tee /dev/tty) | grep -oP 'got: +\K\S+')
|
||||
echo -n $HASH > pnpm-deps-hash.txt
|
||||
|
||||
Reference in New Issue
Block a user