Skip to content

Commit

Permalink
Fix builds for binary download in GPTScript (#4)
Browse files Browse the repository at this point in the history
fix: remove makefat and fix checksum binary names

Signed-off-by: Grant Linville <[email protected]>
Co-authored-by: Grant Linville <[email protected]>
  • Loading branch information
thedadams and g-linville authored Aug 15, 2024
1 parent 3ab839e commit 34e3459
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,8 @@ jobs:
CACHE_FROM: type=gha,scope=build
CACHE_TO: type=gha,scope=build,mode=max
-
name: Rename and list artifacts
name: List artifacts
run: |
mv ./bin/gptscript-credential-pass*darwin-amd64 ./bin/gptscript-credential-pass-darwin-amd64
mv ./bin/gptscript-credential-pass*darwin-arm64 ./bin/gptscript-credential-pass-darwin-arm64
mv ./bin/gptscript-credential-pass*linux-amd64 ./bin/gptscript-credential-pass-linux-amd64
mv ./bin/gptscript-credential-pass*linux-arm64 ./bin/gptscript-credential-pass-linux-arm64
mv ./bin/gptscript-credential-secretservice*linux-amd64 ./bin/gptscript-credential-secretservice-linux-amd64
mv ./bin/gptscript-credential-secretservice*linux-arm64 ./bin/gptscript-credential-secretservice-linux-arm64
tree -nh ${{ env.DESTDIR }}
-
name: Check artifacts
Expand Down
19 changes: 10 additions & 9 deletions hack/release
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,19 @@ find ./${DESTDIR} -type d -empty -delete
# done
#fi

# universal binary
# Rename everything to remove the tag from the name, and generate checksums
(
cd ${DESTDIR}
wget https://github.com/g-linville/makefat/releases/download/v0.1.2/makefat_0.1.2_linux_amd64.tar.gz
tar -xzf makefat_0.1.2_linux_amd64.tar.gz
find . -name "gptscript-credential-osxkeychain-*" -print0 | xargs ./makefat gptscript-credential-osxkeychain
rm -f makefat* gptscript-credential-osxkeychain-*
)

# checksums
(
cd ${DESTDIR}
mv gptscript-credential-osxkeychain*darwin-amd64 gptscript-credential-osxkeychain-darwin-amd64
mv gptscript-credential-osxkeychain*darwin-arm64 gptscript-credential-osxkeychain-darwin-arm64
mv gptscript-credential-pass*darwin-amd64 gptscript-credential-pass-darwin-amd64
mv gptscript-credential-pass*darwin-arm64 gptscript-credential-pass-darwin-arm64
mv gptscript-credential-pass*linux-amd64 gptscript-credential-pass-linux-amd64
mv gptscript-credential-pass*linux-arm64 gptscript-credential-pass-linux-arm64
mv gptscript-credential-secretservice*linux-amd64 gptscript-credential-secretservice-linux-amd64
mv gptscript-credential-secretservice*linux-arm64 gptscript-credential-secretservice-linux-arm64

sha256sum -b gptscript-credential-* > ./checksums.txt
sha256sum -c --strict checksums.txt
)

0 comments on commit 34e3459

Please sign in to comment.