-
Notifications
You must be signed in to change notification settings - Fork 12
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
Support for MacOS universal brinaries #37
Comments
That's possible assuming there's a way to detect the type of binary it's currently running (so it can update to a similar one). I suppose it shouldn't be too difficult. |
Would that work for you? ProposalI'm proposing adding a new field in the configuration where you can set the updater, err := selfupdate.NewUpdater(selfupdate.Config{
UniversalArch: "universal",
})
if err != nil {
log.Fatal(err)
}
release, found, err := updater.DetectLatest(context.Background(), selfupdate.NewRepositorySlug("owner", "cli-tool"))
if err != nil {
log.Fatal(err)
} DefaultThe default value is empty (which is the current behaviour) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
MacOS supports universal binaries. These are binraries which have the amd64 and arm64 target in one binary. How would this be supported by this library.
I saw there is some code to detect the go os and arch version. In case of darwin amd64|arm64 host system the release should also try to detect a "_darwin_universal" file I guess.
Currently we work around this by creating an universal binary and copying it as amd64 and arm64 target.
The text was updated successfully, but these errors were encountered: