Allowing to specify different branch in first parameter

This commit is contained in:
David Vennik
2022-12-21 14:34:17 +00:00
parent 67f0897c62
commit aece9e51c7
2 changed files with 16 additions and 17 deletions

View File

@@ -129,17 +129,6 @@ func main() {
); check(e) {
return
}
switch {
case minor:
Minor++
Patch = 0
case major:
Major++
Minor = 0
Patch = 0
default:
Patch++
}
startArgs := 1
br := strings.Split(GitRef, "/")
branch := br[len(br)-1]
@@ -168,11 +157,21 @@ func main() {
}
tag := true
if branch == "main" {
// Update SemVer
SemVer = fmt.Sprintf("v%d.%d.%d", Major, Minor, Patch)
switch {
case minor:
Minor++
Patch = 0
case major:
Major++
Minor = 0
Patch = 0
default:
Patch++
}
} else {
tag = false
}
SemVer = fmt.Sprintf("v%d.%d.%d", Major, Minor, Patch)
PathBase = tr.Filesystem.Root() + "/"
versionFile := `// Package indra is the root level package for Indranet, a low latency,
// Lightning Network monetised distributed VPN protocol designed for providing