-
Notifications
You must be signed in to change notification settings - Fork 76
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
Allow configuring a name for the archived binary #43
base: master
Are you sure you want to change the base?
Conversation
(Noticed the build failed but I'm at the end of my day, will take a closer look tomorrow 🙇🏼) |
This will default to the existing behavior: using the name of the currently running executable. Fixes rhysd#42
@@ -11,16 +11,34 @@ import ( | |||
"github.com/blang/semver" | |||
) | |||
|
|||
func setupTestBinary() { | |||
if err := exec.Command("go", "build", "./testdata/github-release-test/").Run(); err != nil { | |||
func setupTestBinary(name ...string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in here and teardownTestBinary
feel a bit hacky. An alternative I considered was using a new repo (i.e rhysd-test/test-release-different-name
) which would have contained an archive with a differently named binary, and thus we could leave these two methods here as-is.
Do you have a preference @rhysd ?
FWIW, this is merged in our fork (rainforestapp/go-github-selfupdate) and used by our CLI (see PR implementing it here: https://github.com/rainforestapp/rainforest-cli/pull/413/files), so I can confirm this works in the real world 😅 |
Yes. This repo seems to be no longer maintained. I will move to use yours @magni- |
This will default to the existing behavior: using the name of the currently running executable.
I don't write much Go, so hopefully I didn't do things too terribly 😬
Fixes #42