Commit f0c6a480 by Leonard Gram

build: refactoring

parent 768c7b6f
...@@ -342,7 +342,7 @@ jobs: ...@@ -342,7 +342,7 @@ jobs:
name: Deploy to grafana.com name: Deploy to grafana.com
command: | command: |
cd enterprise-dist 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: deploy-enterprise-release:
......
...@@ -421,13 +421,17 @@ func grunt(params ...string) { ...@@ -421,13 +421,17 @@ func grunt(params ...string) {
} }
} }
func gruntBuildArg(task string) []string { func genPackageVersion() string {
args := []string{task}
if includeBuildId { if includeBuildId {
args = append(args, fmt.Sprintf("--pkgVer=%v-%v", linuxPackageVersion, linuxPackageIteration)) return fmt.Sprintf("%v-%v", linuxPackageVersion, linuxPackageIteration)
} else { } 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 != "" { if pkgArch != "" {
args = append(args, fmt.Sprintf("--arch=%v", pkgArch)) args = append(args, fmt.Sprintf("--arch=%v", pkgArch))
} }
...@@ -449,13 +453,7 @@ func setup() { ...@@ -449,13 +453,7 @@ func setup() {
} }
func printGeneratedVersion() { func printGeneratedVersion() {
var genVersion string fmt.Print(genPackageVersion())
if includeBuildId {
genVersion = fmt.Sprintf("%v-%v", linuxPackageVersion, linuxPackageIteration)
} else {
genVersion = version
}
fmt.Print(genVersion)
} }
func test(pkg string) { 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