Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Commit

Permalink
fix: checksum
Browse files Browse the repository at this point in the history
  • Loading branch information
iwilltry42 committed Aug 6, 2024
1 parent 579cdc1 commit 5598851
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
brew install mingw-w64
# Go Build
- name: Build Binary
run: make build-cross gen-checksum
run: make build-cross
# Create Git Release
- name: Extract Tag from Ref
if: startsWith(github.ref, 'refs/tags/')
Expand Down
8 changes: 8 additions & 0 deletions scripts/cross-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ LD_FLAGS="-s -w -X github.com/gptscript-ai/knowledge/version.Version=${GIT_TAG}"

export CGO_ENABLED=1

touch dist/checksums.txt

if [ "$(go env GOOS)" = "linux" ]; then
# Linux: amd64, arm64
GOARCH=amd64 go build -o dist/knowledge-linux-amd64 -tags "${GO_TAGS}" -ldflags "${LD_FLAGS}\" -extldflags \"-static\" " .

# Checksum
sha256sum dist/knowledge-linux-amd64 >> dist/checksums.txt
else

# Windows: amd64
Expand All @@ -17,4 +22,7 @@ else
# Darwin: amd64, arm64
GOARCH=amd64 go build -o dist/knowledge-darwin-amd64 -tags "${GO_TAGS}" -ldflags "${LD_FLAGS}" .
GOARCH=arm64 go build -o dist/knowledge-darwin-arm64 -tags "${GO_TAGS}" -ldflags "${LD_FLAGS}" .

# Checksum
shasum -a 256 dist/knowledge-windows-amd64 dist/knowledge-darwin-amd64 dist/knowledge-darwin-arm64 >> dist/checksums.txt
fi

0 comments on commit 5598851

Please sign in to comment.