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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user