-
Notifications
You must be signed in to change notification settings - Fork 9
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
Added version flag #27
base: master
Are you sure you want to change the base?
Conversation
This actually won't work, going to fix it. |
go_binary( | ||
name = "wollemi", | ||
srcs = ["main.go"], | ||
visibility = ["PUBLIC"], | ||
definitions = { | ||
"github.com/tcncloud/wollemi/ports/wollemi.WollemiVersion": VERSION, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also just avoid the genrule and build_defs and just hard code the version here ?
@@ -1,7 +1,12 @@ | |||
subinclude("//build_defs:version") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping the VERSION
file in the root of the repo and defining a filegroup
for it causes a circular dependency because //build_defs:version
requires that filegroup
, and the go_binary
requires //build_defs:version
.
I see two possibilities:
- move the wollemi binary up a directory.
- This would allow the VERSION file to remain in the root of the repo, which is where most people would expect it.
- not likely to be forgotten about.
- avoid all the genrule and build_def steps and hard code the version in the go_binary definitions attribute.
- no major changes needed for this
- could be easy to forget about this and forget to increment the version on a new release
- less clear where to increment the version for new contributors
@@ -0,0 +1 @@ | |||
0.7.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we would have this VERSION
file in the root of the repo, but a circular dependency is formed.
Uses
latest
as the version for local and non tagged builds.