1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-02 23:35:40 -05:00

remove git version detection

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

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)