Skip to content

fix: add credential helpers to goreleaser archives #278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,23 @@ builds:
- -s
- -w
- -X "github.com/gptscript-ai/gptscript/pkg/version.Tag=v{{ .Version }}"
hooks:
post: ./scripts/copy-cred-helper.sh {{ .Os }} {{ .Arch }}

universal_binaries:
- id: mac
ids:
- default
replace: true
hooks:
post: cp binaries/gptscript-credential-osxkeychain releases/mac_darwin_all

archives:
- id: default
builds:
- default
- mac
files:
- LICENSE*
- README*
- src: '{{ if eq .Os "darwin" }}binaries/darwin/*{{ else }}binaries/{{ .Os }}/{{ .Arch }}/*{{ end }}'
strip_parent: true
name_template: 'gptscript-v{{ .Version }}-{{ if eq .Os "darwin" }}macOS-universal{{ else }}{{ .Os }}-{{ .Arch }}{{ .Arm }}{{ end }}'
format_overrides:
- goos: windows
Expand Down
29 changes: 0 additions & 29 deletions scripts/copy-cred-helper.sh

This file was deleted.

6 changes: 5 additions & 1 deletion scripts/download-cred-helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@ set -euo pipefail
GPTSCRIPT_CRED_HELPERS_VERSION="v0.1.0"
BINARY_DIR="binaries"

mkdir -p "$BINARY_DIR"
mkdir -p $BINARY_DIR/darwin
mkdir -p $BINARY_DIR/windows/{amd64,arm64}
cd "$BINARY_DIR"

wget -O gptscript-credential-osxkeychain "https://github.com/gptscript-ai/gptscript-credential-helpers/releases/download/${GPTSCRIPT_CRED_HELPERS_VERSION}/gptscript-credential-osxkeychain"
chmod +x gptscript-credential-osxkeychain
mv gptscript-credential-osxkeychain darwin/gptscript-credential-osxkeychain

wget -O gptscript-credential-wincred-amd64.exe "https://github.com/gptscript-ai/gptscript-credential-helpers/releases/download/${GPTSCRIPT_CRED_HELPERS_VERSION}/gptscript-credential-wincred-${GPTSCRIPT_CRED_HELPERS_VERSION}.windows-amd64.exe"
chmod +x gptscript-credential-wincred-amd64.exe
mv gptscript-credential-wincred-amd64.exe windows/amd64/gptscript-credential-wincred.exe

wget -O gptscript-credential-wincred-arm64.exe "https://github.com/gptscript-ai/gptscript-credential-helpers/releases/download/${GPTSCRIPT_CRED_HELPERS_VERSION}/gptscript-credential-wincred-${GPTSCRIPT_CRED_HELPERS_VERSION}.windows-arm64.exe"
chmod +x gptscript-credential-wincred-arm64.exe
mv gptscript-credential-wincred-arm64.exe windows/arm64/gptscript-credential-wincred.exe