Repository navigation
build: build static binaries with Go 1.27 - #17
Merged
Merged
Conversation
- go.mod: go 1.27.0, toolchain go1.27.1; update dependencies; go mod tidy - build.sh: CGO_ENABLED=0, -trimpath, -s -w (static, stripped binaries) - build.yml: go-version '1.27' with check-latest Release asset names and tarball layout are unchanged, so the v0.1.1 updater can still install new releases. Closes #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
go.modsetsgo 1.27.0andtoolchain go1.27.1. This PR updates the dependencies.go mod tidycorrects the// indirectmarks.build.shbuilds withCGO_ENABLED=0,-trimpathand-ldflags "-s -w". Thus the binaries are static and stripped..github/workflows/build.ymlusesgo-version: '1.27'withcheck-latest: true. Each release uses the latest Go 1.27 patch release.Caution
CAUTION: DO NOT CHANGE THE NAMES OR THE CONTENTS OF THE RELEASE ASSETS. IF YOU CHANGE THEM, THE INSTALLED CLIS CANNOT RUN
fly update.fly-linux-<arch>.tar.gz.fly-linux-<arch>.Tests
build.shin agolang:1.27linux/amd64 container. This is the same condition as the CI runner.fileshows that the two binaries are statically linked and stripped.go version -mshows go1.27.1,CGO_ENABLED=0and-trimpath=true.fly-linux-amd64andfly-linux-arm64.fly versionshows thegit describeversion.govulncheck ./...finds no vulnerabilities.go buildandgo vetpass.golangci-lintshows the 8 errcheck findings that were there before. bug: Commands exit with code 0 when they fail, and show incorrect error text #2 and bug(self-update): correct the version comparison, the HTTP errors and the binary replacement #8 remove them.Closes #6