Verify version during build#631
Verify version during build#631mattfarina merged 6 commits intoMasterminds:masterfrom HelloGrayson:verify-version
Conversation
|
This first build should fail, verifying the feature. Once it does, I'll update the value of |
version.go
Outdated
| package main | ||
|
|
||
| // Version is the current version of Glide | ||
| const Version = "0.13.0-dev" |
There was a problem hiding this comment.
Might be useful for exterior libs to be able to get at this, in the case that they use glide as a lib.
There was a problem hiding this comment.
I'd prefer to keep the visibility the same as it was previously as part of this change.
However since this is a main package, other's can't import it anyway.
There was a problem hiding this comment.
Point taken - I updated to maintain the old api!
|
i haven't thought through all the implications of this, but in general it seems like a great idea |
|
@breerly yes, that i understand - that's the intended effect. when i use "implication," i'm referring to potential second-order, unintended effects. this isn't a knock against the PR; it's just a caveat about the depth of my review. |
glide.go
Outdated
| ) | ||
|
|
||
| var version = "0.13.0-dev" | ||
| const version = "0.13.0-dev" |
There was a problem hiding this comment.
By changing from a var to const the ldflags for -X main.version=${VERSION} no longer works in the make build. This is why it was a var in the first place.
I think this needs to be switched back.
|
Once I like having this check. |
|
Got it, I'll switch back to |
|
@breerly thanks for the contribution. |
Let's verify that the
glide.Versionmatches the changelog - this will force us to update this value before releasing and prevent #629 from happening again.To use this correctly, you must:
glide.Version.-devcan optionally be added toglide.Version.We've used this strategy successfully in:
cc @mattfarina