mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Removed semver dependency from go build script
This commit is contained in:
parent
90a77bdf85
commit
f8cfbedefd
11
build.go
11
build.go
@ -19,8 +19,6 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/blang/semver"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -116,12 +114,11 @@ func readVersionFromPackageJson() {
|
|||||||
linuxPackageIteration = ""
|
linuxPackageIteration = ""
|
||||||
|
|
||||||
// handle pre version stuff (deb / rpm does not support semver)
|
// handle pre version stuff (deb / rpm does not support semver)
|
||||||
versionInfo, _ := semver.Make(version)
|
parts := strings.Split(version, "-")
|
||||||
|
|
||||||
if len(versionInfo.Pre) > 0 {
|
if len(parts) > 1 {
|
||||||
linuxPackageIteration = versionInfo.Pre[0].VersionStr
|
linuxPackageVersion = parts[0]
|
||||||
versionInfo.Pre = make([]semver.PRVersion, 0)
|
linuxPackageIteration = parts[1]
|
||||||
linuxPackageVersion = versionInfo.String()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user