Skip to content

Commit ff39d44

Browse files
authored
fix: add credential helpers to goreleaser archives (#278)
Signed-off-by: Grant Linville <grant@acorn.io>
1 parent 9eb6329 commit ff39d44

File tree

3 files changed

+10
-34
lines changed

3 files changed

+10
-34
lines changed

.goreleaser.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,23 @@ builds:
2222
- -s
2323
- -w
2424
- -X "github.com/gptscript-ai/gptscript/pkg/version.Tag=v{{ .Version }}"
25-
hooks:
26-
post: ./scripts/copy-cred-helper.sh {{ .Os }} {{ .Arch }}
2725

2826
universal_binaries:
2927
- id: mac
3028
ids:
3129
- default
3230
replace: true
33-
hooks:
34-
post: cp binaries/gptscript-credential-osxkeychain releases/mac_darwin_all
3531

3632
archives:
3733
- id: default
3834
builds:
3935
- default
4036
- mac
37+
files:
38+
- LICENSE*
39+
- README*
40+
- src: '{{ if eq .Os "darwin" }}binaries/darwin/*{{ else }}binaries/{{ .Os }}/{{ .Arch }}/*{{ end }}'
41+
strip_parent: true
4142
name_template: 'gptscript-v{{ .Version }}-{{ if eq .Os "darwin" }}macOS-universal{{ else }}{{ .Os }}-{{ .Arch }}{{ .Arm }}{{ end }}'
4243
format_overrides:
4344
- goos: windows

scripts/copy-cred-helper.sh

Lines changed: 0 additions & 29 deletions
This file was deleted.

scripts/download-cred-helpers.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@ set -euo pipefail
77
GPTSCRIPT_CRED_HELPERS_VERSION="v0.1.0"
88
BINARY_DIR="binaries"
99

10-
mkdir -p "$BINARY_DIR"
10+
mkdir -p $BINARY_DIR/darwin
11+
mkdir -p $BINARY_DIR/windows/{amd64,arm64}
1112
cd "$BINARY_DIR"
1213

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

1618
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"
1719
chmod +x gptscript-credential-wincred-amd64.exe
20+
mv gptscript-credential-wincred-amd64.exe windows/amd64/gptscript-credential-wincred.exe
1821

1922
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"
2023
chmod +x gptscript-credential-wincred-arm64.exe
24+
mv gptscript-credential-wincred-arm64.exe windows/arm64/gptscript-credential-wincred.exe

0 commit comments

Comments
 (0)