-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathversion.go
More file actions
29 lines (21 loc) · 819 Bytes
/
version.go
File metadata and controls
29 lines (21 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package main
import "strings"
// commit contains the current git commit this code was built on and should be set via -ldflags
var commit string
// branch contains the git branch this code was built on and should be set via -ldflags
var branch string
// stamp contains the build date and should be set via -ldflags
var stamp string
// VERSION is the version of this application
var VERSION = "0.17.6"
// APP is the name of the application
const APP = "bb"
// PACKAGE is the name of the package (used to create artifacts)
const PACKAGE = "bitbucket-cli"
// Version gets the current version of the application
func Version() string {
if strings.HasPrefix(strings.ToLower(branch), "dev") || strings.HasPrefix(strings.ToLower(branch), "feature") {
return VERSION + "+" + stamp + "." + commit
}
return VERSION
}