Browse Source

build, jenkins: Jenkins version tag should be same as when building manually

Jakob Borg 9 years ago
parent
commit
3e51206a6b
2 changed files with 4 additions and 1 deletions
  1. 3 0
      build.go
  2. 1 1
      jenkins/common.bash

+ 3 - 0
build.go

@@ -298,6 +298,9 @@ func runCommand(cmd string, target target) {
 			}
 		}
 
+	case "version":
+		fmt.Println(getVersion())
+
 	default:
 		log.Fatalf("Unknown command %q", cmd)
 	}

+ 1 - 1
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
 }