goshorly/utils/build-vars.go

23 lines
373 B
Go
Raw Permalink Normal View History

2021-12-08 10:04:28 +00:00
package utils
var (
CI_COMMIT_SHORT_SHA string
CI_COMMIT_BRANCH string
CI_COMMIT_TAG string
CI_TAGGED bool
CI_BUILD bool
2021-12-08 10:04:28 +00:00
)
func Init_build_vars() {
if CI_COMMIT_SHORT_SHA == "" && CI_COMMIT_BRANCH == "" {
CI_BUILD = false
2021-12-08 10:04:28 +00:00
} else {
CI_BUILD = true
}
if CI_COMMIT_TAG == "" {
CI_TAGGED = false
} else {
CI_TAGGED = true
2021-12-08 10:04:28 +00:00
}
}