Skip to content

Commit 8524da4

Browse files
authored
Update ghcr-upload.sh (#180)
Drop using nix build, which has a tendency to rebuild stuff. And use nix path-info and nix-store directly.
1 parent 5afed24 commit 8524da4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

extra/ghcr-upload.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#! /usr/bin/env nix-shell
2-
#! nix-shell -i bash -p zstd -p oras
2+
#! nix-shell -i bash -p zstd -p oras -p jq
33
set -euox pipefail
44

5-
nix build ".#hydraJobs.${DEV_SHELL}" --show-trace --accept-flake-config
6-
nix-store --export $(nix-store -qR result) | tee store-paths.txt | zstd -z8T8 >${DEV_SHELL}
5+
SHELL_NIX_PATH=$(nix path-info ".#hydraJobs.${DEV_SHELL}" --accept-flake-config --json | jq -r 'keys[0]')
6+
nix-store -r "$SHELL_NIX_PATH"
7+
#nix build ".#hydraJobs.${DEV_SHELL}" --show-trace --accept-flake-config
8+
nix-store --export $(nix-store -qR "$SHELL_NIX_PATH") | tee store-paths.txt | zstd -z8T8 >${DEV_SHELL}
79
if [[ ! $(tail -n 1 store-paths.txt) =~ "devx" ]]; then exit 1; fi
810
oras push ghcr.io/input-output-hk/devx:${DEV_SHELL} ${DEV_SHELL}

0 commit comments

Comments
 (0)