Skip to content

chore: include gptscript-credential-helpers in packaging #275

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 3 commits into from
Apr 25, 2024

Conversation

g-linville
Copy link
Member

This should be the last step for packaging the GPTScript credential helpers, which are small CLI programs (forked from the docker-credential-helpers repo) that gptscript uses to interact with OS keystores. The source for this is at github.com/gptscript-ai/gptscript-credential-helpers

I recently revamped and cleaned up the credential helper repo and created its first GitHub release, v0.1.0. I also combined the amd64 and arm64 darwin binaries into a single universal binary using github.com/g-linville/makefat, my fork of the tool github.com/randall77/makefat. (We can move this fork to gptscript-ai if we want. I basically just added CI and a goreleaser config for it, and set up reproducible builds.)

These changes add hooks to the goreleaser file to download the compiled binaries for gptscript-credential-osxkeychain and gptscript-credential-wincred.exe from the v0.1.0 release in the credential helpers repo. Then, the programs get copied into the correct release folder for their corresponding OS+arch.

The trouble with this is that I can't fully test to make sure that the changes are picked up and working in Homebrew and Winget until this is in. Since Winget is just uploading the archive that contains the binaries, I think it should work. And I added another command to the Homebrew formula that should cause it to install the osxkeychain helper alongside gptscript itself.

mkdir -p "$BINARY_DIR"
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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why wget :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually like wget a lot just for downloading files, lol. I can never remember the arguments I need to give to curl. 🤷‍♂️

Signed-off-by: Grant Linville <[email protected]>
Signed-off-by: Grant Linville <[email protected]>
@g-linville g-linville force-pushed the package-cred-helpers branch from e62b51c to 38df29b Compare April 24, 2024 18:25
@g-linville g-linville requested a review from thedadams April 24, 2024 18:26
@g-linville g-linville merged commit 9eb6329 into gptscript-ai:main Apr 25, 2024
1 check passed
@g-linville g-linville deleted the package-cred-helpers branch April 25, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants