ci(build): Update build to use make #160
Merged
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.
Previously we relied upon
GO_LDFLAGS
to be passed in to get information such as the branch, revision, and version information. Another pattern we can follow is to use the existingmake build-binary
command which as all of the scripting defined for the necessary variables to build up theGO_LDFLAGS
. In order to support this, we needgit
andmake
installed, which thankfully come bundled with the regular golang image.Updates
VERSION
to begit describe --tags --dirty --always
which will use the the tag information from git directly. The neat this about this command is that if you're on a branch that isn't tagged, it'll return the latest tag and append an abbreviation of the current commit which will guarantee uniqueness between branches. This will support us making "dirty" releases on main, and then when we create a new tags, we'll have an image created with that specific tag.To test out, I've built locally with a tag
poko-test-local
:When running the image locally, you'll note the version gets propogated: