2021-12-08 10:04:28 +00:00
|
|
|
package utils
|
|
|
|
|
|
|
|
var (
|
2022-01-11 11:05:07 +00:00
|
|
|
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() {
|
2022-01-11 11:05:07 +00:00
|
|
|
if CI_COMMIT_SHORT_SHA == "" && CI_COMMIT_BRANCH == "" {
|
|
|
|
CI_BUILD = false
|
2021-12-08 10:04:28 +00:00
|
|
|
} else {
|
2022-01-11 11:05:07 +00:00
|
|
|
CI_BUILD = true
|
|
|
|
}
|
|
|
|
if CI_COMMIT_TAG == "" {
|
|
|
|
CI_TAGGED = false
|
|
|
|
} else {
|
|
|
|
CI_TAGGED = true
|
2021-12-08 10:04:28 +00:00
|
|
|
}
|
|
|
|
}
|