Worker: make -version CLI option show the 'extended' version

`flamenco-worker -version` now shows the 'extended' version. This is just
the application version when running a release build. Otherwise it will
be like `3.3-alpha0 (v3.2-nn-ghhhhhh)`, where `nn` is the number of commits
since the last-tagged version (`v3.2` in this example), and `ghhhhhh` is
the Git hash. This can optionally be suffixed by `-dirty` if there were
any uncommitted changes when Flamenco was built.
This commit is contained in:
Sybren A. Stüvel 2023-07-13 15:38:39 +02:00
parent ebd40dbcd5
commit 3def3d2260

View File

@ -52,7 +52,7 @@ var cliArgs struct {
func main() { func main() {
parseCliArgs() parseCliArgs()
if cliArgs.version { if cliArgs.version {
fmt.Println(appinfo.ApplicationVersion) fmt.Println(appinfo.ExtendedVersion())
return return
} }