Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

coltonmorris
Copy link

Uses latest as the version for local and non tagged builds.

@coltonmorris
Copy link
Author

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,
Copy link
Author

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")
Copy link
Author

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant