Skip to content

Commit

Permalink
Merge branch 'main-0.3' into main-0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Nov 7, 2024
2 parents 7e81fd0 + a217645 commit 5a1e06c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions nix/zome.nix
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ let

guardedRelease = if matchingZomeHash != null then
runCommandNoCC "check-zome-${crate}-hash" {
srcs = [ release matchingZomeHash.meta.release ];
srcs = [ release matchingZomeHash ];
buildInputs = [ zome-wasm-hash ];
} ''
ORIGINAL_HASH=$(zome-wasm-hash ${matchingZomeHash.meta.release})
ORIGINAL_HASH=$(zome-wasm-hash ${matchingZomeHash})
NEW_HASH=$(zome-wasm-hash ${release})
if [[ "$ORIGINAL_HASH" != "$NEW_HASH" ]]; then
Expand Down
4 changes: 2 additions & 2 deletions templates/app/web-app/package.json.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"launch": "echo pass | RUST_LOG=warn hc launch --piped -n $AGENTS workdir/{{app_name}}.happ --ui-port $UI_PORT network --bootstrap http://127.0.0.1:$BOOTSTRAP_PORT webrtc ws://127.0.0.1:$SIGNAL_PORT",
"local-services": "hc run-local-services --bootstrap-port $BOOTSTRAP_PORT --signal-port $SIGNAL_PORT",
"test": "pnpm build:happ && nix flake check -L && pnpm -F tests test",
"build:happ": "nix build -L .#{{app_name}} -o workdir/{{app_name}}.happ",
"package": "nix build -L .#{{app_name}}.meta.release -o workdir/{{app_name}}.happ && pnpm -F ui package && hc web-app pack workdir"
"build:happ": "nix build -L .#{{app_name}}.meta.debug -o workdir/{{app_name}}.happ",
"package": "nix build -L .#{{app_name}} -o workdir/{{app_name}}.happ && pnpm -F ui package && hc web-app pack workdir"
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,30 +39,30 @@ jobs:
env:
CACHIX_AUTH_TOKEN: "$\{{ secrets.DARKSOIL_CACHIX_AUTH_TOKEN }}"
run: |
cachix watch-exec darksoil-studio -- nix build --no-update-lock-file --accept-flake-config -L .#{{snake_case app_name}}_integrity
cachix push darksoil-studio $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}}_integrity | jq -- -r 'keys[0]')
cachix watch-exec darksoil-studio -- nix build --no-update-lock-file --accept-flake-config -L .#{{snake_case app_name}}_integrity.meta.debug
cachix push darksoil-studio $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}}_integrity.meta.debug | jq -- -r 'keys[0]')

cachix watch-exec darksoil-studio -- nix build --no-update-lock-file --accept-flake-config -L .#{{snake_case app_name}}
cachix push darksoil-studio $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}} | jq -- -r 'keys[0]')
cachix watch-exec darksoil-studio -- nix build --no-update-lock-file --accept-flake-config -L .#{{snake_case app_name}}.meta.debug
cachix push darksoil-studio $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}}.meta.debug | jq -- -r 'keys[0]')

- name: Pin debug zomes
if: github.event_name != 'pull_request'
env:
CACHIX_AUTH_TOKEN: "$\{{ secrets.DARKSOIL_CACHIX_AUTH_TOKEN }}"
run: |
cachix pin darksoil-studio {{snake_case app_name}}_integrity_debug $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}}_integrity | jq -- -r 'keys[0]')
cachix pin darksoil-studio {{snake_case app_name}}_debug $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}} | jq -- -r 'keys[0]')
cachix pin darksoil-studio {{snake_case app_name}}_integrity_debug $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}}_integrity.meta.debug | jq -- -r 'keys[0]')
cachix pin darksoil-studio {{snake_case app_name}}_debug $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}}.meta.debug | jq -- -r 'keys[0]')

- name: Build release zomes
if: matrix.os == 'ubuntu-latest'
env:
CACHIX_AUTH_TOKEN: "$\{{ secrets.DARKSOIL_CACHIX_AUTH_TOKEN }}"
run: |
cachix watch-exec darksoil-studio -- nix build --no-update-lock-file --accept-flake-config -L .#{{snake_case app_name}}_integrity.meta.release
cachix push darksoil-studio $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}}_integrity.meta.release | jq -- -r 'keys[0]')
cachix watch-exec darksoil-studio -- nix build --no-update-lock-file --accept-flake-config -L .#{{snake_case app_name}}_integrity
cachix push darksoil-studio $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}}_integrity | jq -- -r 'keys[0]')

cachix watch-exec darksoil-studio -- nix build --no-update-lock-file --accept-flake-config -L .#{{snake_case app_name}}.meta.release
cachix push darksoil-studio $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}}.meta.release | jq -- -r 'keys[0]')
cachix watch-exec darksoil-studio -- nix build --no-update-lock-file --accept-flake-config -L .#{{snake_case app_name}}
cachix push darksoil-studio $(nix path-info --json --accept-flake-config --no-warn-dirty .#{{snake_case app_name}} | jq -- -r 'keys[0]')

- name: Pin release zomes
if: github.event_name != 'pull_request' && matrix.os == 'ubuntu-latest'
Expand Down
2 changes: 1 addition & 1 deletion templates/zome/web-app/package.json.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"launch": "echo pass | RUST_LOG=warn hc launch --piped -n $AGENTS workdir/{{app_name}}_test.happ --ui-port $UI_PORT network --bootstrap http://127.0.0.1:$BOOTSTRAP_PORT webrtc ws://127.0.0.1:$SIGNAL_PORT",
"local-services": "hc run-local-services --bootstrap-port $BOOTSTRAP_PORT --signal-port $SIGNAL_PORT",
"test": "pnpm build:happ && nix flake check -L && pnpm -F tests test",
"build:happ": "nix build -L .#{{snake_case app_name}}_test_happ -o workdir/{{app_name}}_test.happ"
"build:happ": "nix build -L .#{{snake_case app_name}}_test_happ.meta.debug -o workdir/{{app_name}}_test.happ"
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
Expand Down

0 comments on commit 5a1e06c

Please sign in to comment.