Linux 运行环境固定为 opencv-4.9.0 gdal-3.8.4 ubuntu-22.04
This commit is contained in:
46
cmd/version.go
Normal file
46
cmd/version.go
Normal file
@@ -0,0 +1,46 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
// 版本信息
|
||||
|
||||
var (
|
||||
// BuildDate date string of when build was performed filled in by -X compile flag
|
||||
BuildDate string
|
||||
// LatestCommit date string of when build was performed filled in by -X compile flag
|
||||
LatestCommit string
|
||||
// BuildNumber date string of when build was performed filled in by -X compile flag
|
||||
BuildNumber string
|
||||
// BuiltOnIP date string of when build was performed filled in by -X compile flag
|
||||
BuiltOnIP string
|
||||
// BuiltOnOs date string of when build was performed filled in by -X compile flag
|
||||
BuiltOnOs string
|
||||
// RuntimeVer date string of when build was performed filled in by -X compile flag
|
||||
RuntimeVer string
|
||||
// Branch git branch
|
||||
Branch string
|
||||
// CommitCnt ...
|
||||
CommitCnt string
|
||||
// Version
|
||||
ShowVersion bool
|
||||
)
|
||||
|
||||
func version() string {
|
||||
v := fmt.Sprintf(`
|
||||
Main Version: v1.0.0-beta
|
||||
---------------------------------------------------------
|
||||
BUILT_ON_IP %s
|
||||
BUILT_ON_OS %s
|
||||
DATE %s
|
||||
LATEST_COMMIT %s
|
||||
BRANCH %s
|
||||
COMMIT_CNT %s
|
||||
BUILD_NUMBER %s
|
||||
RUNTIME_VER %s
|
||||
OpenCV Version 4.9.0
|
||||
GDAL Version 3.8.4
|
||||
---------------------------------------------------------
|
||||
`, BuiltOnIP, BuiltOnOs, BuildDate, LatestCommit, Branch, CommitCnt, BuildNumber, RuntimeVer)
|
||||
|
||||
return v
|
||||
}
|
||||
Reference in New Issue
Block a user