1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-18 05:18:24 +02:00

29 lines
456 B
Go
Raw Normal View History

2019-10-31 13:57:29 +01:00
package cmd
import (
"fmt"
"github.com/SAP/jenkins-library/pkg/telemetry"
2019-10-31 13:57:29 +01:00
)
// GitCommit ...
var GitCommit string
// GitTag ...
var GitTag string
func version(config versionOptions, telemetryData *telemetry.CustomData) {
2019-10-31 13:57:29 +01:00
gitCommit, gitTag := "<n/a>", "<n/a>"
if len(GitCommit) > 0 {
gitCommit = GitCommit
}
if len(GitTag) > 0 {
gitTag = GitTag
}
fmt.Printf("piper-version:\n commit: \"%s\"\n tag: \"%s\"\n", gitCommit, gitTag)
2019-10-31 13:57:29 +01:00
}