From 354d647e903fff337b656ba427afd7b56abb37b1 Mon Sep 17 00:00:00 2001 From: EngineerProjects Date: Mon, 22 Jun 2026 19:14:30 +0200 Subject: [PATCH] fix(release): drop Windows target, fix sha256sum portability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - release.yml: remove windows-amd64 from matrix — code uses Linux/Unix-only syscalls (Stat_t, Lstat, unix.Kill, Setsid) that do not compile on Windows; add fail-fast: false so a single platform failure cannot cancel the others - install.sh: replace bare sha256sum with portable _sha256check() that falls back to 'shasum -a 256' on macOS where sha256sum is not available --- .github/workflows/release.yml | 12 ++++-------- scripts/install.sh | 13 ++++++++++++- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e179913..ff0147d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,6 +13,7 @@ jobs: name: Build ${{ matrix.suffix }} runs-on: ubuntu-latest strategy: + fail-fast: false matrix: include: - goos: linux @@ -27,10 +28,6 @@ jobs: - goos: darwin goarch: arm64 suffix: darwin-arm64 - - goos: windows - goarch: amd64 - suffix: windows-amd64 - ext: .exe steps: - uses: actions/checkout@v4 @@ -50,7 +47,7 @@ jobs: go build \ -trimpath \ -ldflags="-s -w -X main.version=${{ github.ref_name }}" \ - -o dist/seshat-${{ matrix.suffix }}${{ matrix.ext || '' }} \ + -o dist/seshat-${{ matrix.suffix }} \ ./cmd/cli - name: Build gRPC server @@ -62,7 +59,7 @@ jobs: go build \ -trimpath \ -ldflags="-s -w -X main.version=${{ github.ref_name }}" \ - -o dist/seshat-grpc-${{ matrix.suffix }}${{ matrix.ext || '' }} \ + -o dist/seshat-grpc-${{ matrix.suffix }} \ ./cmd/grpc - name: Upload artifacts @@ -89,6 +86,5 @@ jobs: - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: - files: | - dist/** + files: dist/** generate_release_notes: true diff --git a/scripts/install.sh b/scripts/install.sh index 9b230b8..70e1ed7 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -17,6 +17,17 @@ set -euo pipefail +# Portable SHA256 check: sha256sum (Linux) or shasum -a 256 (macOS) +_sha256check() { + if command -v sha256sum &>/dev/null; then + sha256sum --check --status + elif command -v shasum &>/dev/null; then + shasum -a 256 --check --status + else + error "No SHA256 tool found (sha256sum or shasum)" ; exit 1 + fi +} + REPO="EngineerProjects/seshat" BINARY="seshat" INSTALL_DIR="${INSTALL_DIR:-$HOME/.local/bin}" @@ -104,7 +115,7 @@ _dl "$BASE_URL/SHA256SUMS.txt" "$TMP_DIR/SHA256SUMS.txt" # ── Verify checksum ─────────────────────────────────────────────────────────── step "Verifying checksum" -(cd "$TMP_DIR" && grep "$BIN_ASSET" SHA256SUMS.txt | sha256sum --check --status) \ +(cd "$TMP_DIR" && grep "$BIN_ASSET" SHA256SUMS.txt | _sha256check) \ || { error "Checksum verification failed — aborting."; exit 1; } success "Checksum OK"