Skip to content

Added version flag#27

Open
coltonmorris wants to merge 4 commits intotcncloud:masterfrom
coltonmorris:master
Open

Added version flag#27
coltonmorris wants to merge 4 commits intotcncloud:masterfrom
coltonmorris:master

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.

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