Add version constants - #63
Conversation
|
Seems like CI failed to fetch |
| app.Name = "sensorbee" | ||
| app.Usage = "SensorBee" | ||
| app.Version = "0.3.2" // TODO: don't hardcode the version number | ||
| app.Usage = "SensorBee built with build_sensorbee 0.4.1" |
There was a problem hiding this comment.
Is build_sensorbee command version is always linked to sensorbee revision? I think this usage phrase can also be used version.Version, like
fmt.Sprintf("SensorBee build with build_sensorbee %s", version.Version)
There was a problem hiding this comment.
No, it shouldn't be. If we do it, we cannot see the problem when we build a sensorbee binary with a wrong version of build_sensorbee because it always print the latest version at the time of the execution of build_sensorbee. For example, when a user wrongly uses build_sensorbee 0.1.0 and the version of installed sensorbee package is 0.2.0, the original approach prints 0.1.0 but your approach shows the binary is built with build_sensorbee 0.2.0 although the actual version of build_sensorbee is 0.1.0.
There was a problem hiding this comment.
By the way, "SensorBee built with build_sensorbee 0.4.1" is generated by 410040c#diff-f31a5067e810e776393da95bccd8c0a2R199
I added version package and version constants in the package. I also modified commands to show the correct version using version constants.
After merging this PR, we should relesae v0.4.2 (ref #62).
fixes #13