Pārlūkot izejas kodu

Removed semver dependency from go build script

Torkel Ödegaard 10 gadi atpakaļ
vecāks
revīzija
f8cfbedefd
1 mainītis faili ar 4 papildinājumiem un 7 dzēšanām
  1. 4 7
      build.go

+ 4 - 7
build.go

@@ -19,8 +19,6 @@ import (
 	"strconv"
 	"strings"
 	"time"
-
-	"github.com/blang/semver"
 )
 
 var (
@@ -116,12 +114,11 @@ func readVersionFromPackageJson() {
 	linuxPackageIteration = ""
 
 	// handle pre version stuff (deb / rpm does not support semver)
-	versionInfo, _ := semver.Make(version)
+	parts := strings.Split(version, "-")
 
-	if len(versionInfo.Pre) > 0 {
-		linuxPackageIteration = versionInfo.Pre[0].VersionStr
-		versionInfo.Pre = make([]semver.PRVersion, 0)
-		linuxPackageVersion = versionInfo.String()
+	if len(parts) > 1 {
+		linuxPackageVersion = parts[0]
+		linuxPackageIteration = parts[1]
 	}
 }