summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJérôme Benoit <[email protected]>2026-02-01 00:56:49 +0100
committerGitHub <[email protected]>2026-01-31 17:56:49 -0600
commit0961632a9c9dfed733d80cdd189a7e56abd14e56 (patch)
tree8fee9f4f66089dbb3e2c860bbf00c7aa95a81c0b
parentabbf60080dbd0613faf6e02fb60e39a6a573176b (diff)
downloadopencode-0961632a9c9dfed733d80cdd189a7e56abd14e56.tar.gz
opencode-0961632a9c9dfed733d80cdd189a7e56abd14e56.zip
fix(ci): portable hash parsing in nix-hashes workflow (#11533)
-rw-r--r--.github/workflows/nix-hashes.yml6
1 files changed, 2 insertions, 4 deletions
diff --git a/.github/workflows/nix-hashes.yml b/.github/workflows/nix-hashes.yml
index bb4db7088..caf94e140 100644
--- a/.github/workflows/nix-hashes.yml
+++ b/.github/workflows/nix-hashes.yml
@@ -58,10 +58,8 @@ jobs:
# Build with fakeHash to trigger hash mismatch and reveal correct hash
nix build ".#packages.${SYSTEM}.node_modules_updater" --no-link 2>&1 | tee "$BUILD_LOG" || true
- HASH="$(grep -E 'got:\s+sha256-' "$BUILD_LOG" | sed -E 's/.*got:\s+(sha256-[A-Za-z0-9+/=]+).*/\1/' | head -n1 || true)"
- if [ -z "$HASH" ]; then
- HASH="$(grep -A2 'hash mismatch' "$BUILD_LOG" | grep 'got:' | sed -E 's/.*got:\s+(sha256-[A-Za-z0-9+/=]+).*/\1/' | head -n1 || true)"
- fi
+ # Extract hash from build log with portability
+ HASH="$(grep -oE 'sha256-[A-Za-z0-9+/=]+' "$BUILD_LOG" | tail -n1 || true)"
if [ -z "$HASH" ]; then
echo "::error::Failed to compute hash for ${SYSTEM}"