MCPcopy Index your code
hub / github.com/cli/cli / version

Function version

script/build.go:125–134  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

123}
124
125func version() string {
126 if versionEnv := os.Getenv("GH_VERSION"); versionEnv != "" {
127 return versionEnv
128 }
129 if desc, err := cmdOutput("git", "describe", "--tags"); err == nil {
130 return desc
131 }
132 rev, _ := cmdOutput("git", "rev-parse", "--short", "HEAD")
133 return rev
134}
135
136func date() string {
137 t := time.Now()

Callers 1

build.goFile · 0.85

Calls 1

cmdOutputFunction · 0.85

Tested by

no test coverage detected