From c1e6bf8eadd9608f098afa90d102bccb1bc98030 Mon Sep 17 00:00:00 2001 From: Karun Agarwal Date: Tue, 27 Jan 2026 14:32:52 +0530 Subject: [PATCH] ci(windows): use sha256sum for cross-platform hash computation --- .github/workflows/ci.yml | 4 +--- scripts/bundle-a2ui.sh | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae11e2ab3..8cc86bd63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -272,9 +272,7 @@ jobs: pnpm install --frozen-lockfile --ignore-scripts=false --config.engine-strict=false --config.enable-pre-post-scripts=true || pnpm install --frozen-lockfile --ignore-scripts=false --config.engine-strict=false --config.enable-pre-post-scripts=true - name: Run ${{ matrix.task }} (${{ matrix.runtime }}) - run: | - export PATH="/c/Program Files/Git/usr/bin:$PATH" - ${{ matrix.command }} + run: ${{ matrix.command }} checks-macos: if: github.event_name == 'pull_request' diff --git a/scripts/bundle-a2ui.sh b/scripts/bundle-a2ui.sh index a1cf7ff2b..955f70dc8 100755 --- a/scripts/bundle-a2ui.sh +++ b/scripts/bundle-a2ui.sh @@ -30,11 +30,20 @@ collect_files() { } compute_hash() { - collect_files \ - | LC_ALL=C sort -z \ - | xargs -0 shasum -a 256 \ - | shasum -a 256 \ - | awk '{print $1}' + # Use sha256sum (more portable on Windows) or fall back to shasum + if command -v sha256sum >/dev/null 2>&1; then + collect_files \ + | LC_ALL=C sort -z \ + | xargs -0 sha256sum \ + | sha256sum \ + | awk '{print $1}' + else + collect_files \ + | LC_ALL=C sort -z \ + | xargs -0 shasum -a 256 \ + | shasum -a 256 \ + | awk '{print $1}' + fi } current_hash="$(compute_hash)"