remove git version detection

This commit is contained in:
Darien Raymond committed 2017-01-11 23:59:37 +01:00
1 parent 3a8eef2dec
commit ab78b5a17e
3 files changed
+6 -91

No files matched your search

+6 -10
View File
@@ -7,7 +7,7 @@ import (
"path/filepath"
"runtime"
"v2ray.com/core/tools/git"
"v2ray.com/core"
)
var (
@@ -61,16 +61,12 @@ func build(targetOS, targetArch string, archive bool, version string, metadataFi
v2rayArch := parseArch(targetArch)
if len(version) == 0 {
headVer, err := git.RepoVersionHead()
if headVer == git.VersionUndefined {
headVer = "custom"
}
if err != nil {
fmt.Println("Unable to detect V2Ray version: " + err.Error())
return
}
version = headVer
version = os.Getenv("TRAVIS_TAG")
}
if len(version) == 0 {
version = core.Version()
}
fmt.Printf("Building V2Ray (%s) for %s %s\n", version, v2rayOS, v2rayArch)
targetDir, err := createTargetDirectory(version, v2rayOS, v2rayArch)