-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
version: Add versioning for github tarballs
When building from github tarballs, getting the version from `git describe` won't work, or worse, will be irrelevant [1] However, we can make use of $Format$ and .gitattributes as described in [2] to automatically substitute the correct version in a go variable when `git archive` is used. In particular, the correct version number will automatically be substituted when GitHub creates releass tarballs. [1] rpms/gvisor-tap-vsock.spec uses `%autosetup -Sgit -n %{name}-%{version}` which unpacks the release tarball in a newly created git repository. [2] https://icinga.com/blog/2022/05/25/embedding-git-commit-information-in-go-binaries/ Signed-off-by: Christophe Fergeau <[email protected]>
- Loading branch information
Showing
3 changed files
with
14 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/pkg/types/version.go export-subst |
This file contains 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
This file contains 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