-
Notifications
You must be signed in to change notification settings - Fork 16
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
return 0.0.0.0 if no tag found #16
Conversation
Issue #, if available: *Description of changes:* upstream dependency go-winres uses `git tag` to embed versioning in Windows binary. However, if the repo from which finch is being built has no tags, build will fail. Add note on how to fetch upstream finch tags. See tc-hib/go-winres#16 *Testing done:* - [x] I've reviewed the guidance in CONTRIBUTING.md #### License Acceptance By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. Signed-off-by: Gavin Inglis <[email protected]>
Hi, Thank you for this pull request. Maybe we should use "0.0.0.0" instead ? |
The git-tag value means the current tag will be retrieved from git describe --tags and add it to the properties of the executable: https://github.com/tc-hib/go-winres#automatic-version-from-git This does not work if the current working repository has no tags in its history, such as my fork of this repo. Instead, return a "0.0.0.0" version. Signed-off-by: Gavin Inglis <[email protected]>
--always
in git describe --tags
Sounds good to me. Added a revision that uses "0.0.0.0" |
Issue #, if available: *Description of changes:* upstream dependency go-winres uses `git tag` to embed versioning in Windows binary. However, if the repo from which finch is being built has no tags, build will fail. Add note on how to fetch upstream finch tags. See tc-hib/go-winres#16 *Testing done:* - [x] I've reviewed the guidance in CONTRIBUTING.md #### License Acceptance By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. Signed-off-by: Gavin Inglis <[email protected]>
Issue #, if available: *Description of changes:* upstream dependency go-winres uses `git tag` to embed versioning in Windows binary. However, if the repo from which finch is being built has no tags, build will fail. Add note on how to fetch upstream finch tags. See tc-hib/go-winres#16 *Testing done:* - [x] I've reviewed the guidance in CONTRIBUTING.md #### License Acceptance By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. Signed-off-by: Gavin Inglis <[email protected]> Signed-off-by: Vishwas Siravara <[email protected]>
Description
The git-tag value means the current tag will be retrieved from
git describe --tags
and add it to the properties of the executable: https://github.com/tc-hib/go-winres#automatic-version-from-git This does not work if the current working repository has no tags in its history, such as my fork of this repo.Instead use
git describe --tags --always
to always return a value fromgit describe
- defaulting to the latest commit if no tags found: https://git-scm.com/docs/git-describe#Documentation/git-describe.txt---alwaysAlso, updates go.mod and go.sum
Testing
go test ./...
Context
In cmd/finch/main_windows.go, we are calling go-winres make with flags set to git-tag:
https://github.com/runfinch/finch/blob/76adf59588b1455a535f389eb4c714e1b9daede3/cmd/finch/main_windows.go#L6
Building is failing if the build occurs in a repository with no local tags. It’s only after I have my upstream remote set to the main finch repo and run
git fetch upstream --tags
that I can successfully build finch.