Commit f0c6a480 by Leonard Gram

build: refactoring

parent 768c7b6f
......@@ -342,7 +342,7 @@ jobs:
name: Deploy to grafana.com
command: |
cd enterprise-dist
../scripts/build/release_publisher/release_publisher -apikey ${GRAFANA_COM_API_KEY} -enterprise -version "$(cat grafana.version)"' --nightly
../scripts/build/release_publisher/release_publisher -apikey ${GRAFANA_COM_API_KEY} -enterprise -version "$(cat grafana.version)" --nightly
deploy-enterprise-release:
......
......@@ -421,13 +421,17 @@ func grunt(params ...string) {
}
}
func gruntBuildArg(task string) []string {
args := []string{task}
func genPackageVersion() string {
if includeBuildId {
args = append(args, fmt.Sprintf("--pkgVer=%v-%v", linuxPackageVersion, linuxPackageIteration))
return fmt.Sprintf("%v-%v", linuxPackageVersion, linuxPackageIteration)
} else {
args = append(args, fmt.Sprintf("--pkgVer=%v", version))
return version
}
}
func gruntBuildArg(task string) []string {
args := []string{task}
args = append(args, fmt.Sprintf("--pkgVer=%v", genPackageVersion()))
if pkgArch != "" {
args = append(args, fmt.Sprintf("--arch=%v", pkgArch))
}
......@@ -449,13 +453,7 @@ func setup() {
}
func printGeneratedVersion() {
var genVersion string
if includeBuildId {
genVersion = fmt.Sprintf("%v-%v", linuxPackageVersion, linuxPackageIteration)
} else {
genVersion = version
}
fmt.Print(genVersion)
fmt.Print(genPackageVersion())
}
func test(pkg string) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment