diff --git a/build.go b/build.go index 727cdc968..3c569c501 100644 --- a/build.go +++ b/build.go @@ -298,6 +298,9 @@ func runCommand(cmd string, target target) { } } + case "version": + fmt.Println(getVersion()) + default: log.Fatalf("Unknown command %q", cmd) } diff --git a/jenkins/common.bash b/jenkins/common.bash index 512bdee9a..cba358477 100644 --- a/jenkins/common.bash +++ b/jenkins/common.bash @@ -23,7 +23,7 @@ function init { rm -f *.tar.gz *.zip *.deb cd src/github.com/syncthing/syncthing - version=$(git describe) + version=$(go run build.go version) echo "Building $version" echo }