diff --git a/Makefile b/Makefile index 2c0b01d..b80fb97 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ lint: gen: generate -SEMVER ?= 1.2.6 +SEMVER ?= 1.2.7 release: @$(GIT) tag v$(SEMVER) diff --git a/README.md b/README.md index aced795..0dab608 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ docker run \ --volume $(pwd)/sindri:/var/lib/sindri \ # Valheim listens on port 2456 for UDP traffic by default. --publish 2456:2456/udp \ - ghcr.io/frantjc/sindri:1.2.6 \ + ghcr.io/frantjc/sindri:1.2.7 \ --root /var/lib/sindri ``` @@ -76,7 +76,7 @@ The desired list of mods can be passed to Sindri via `--mod`. docker run \ --volume $(pwd)/sindri:/var/lib/sindri \ --publish 2456:2456/udp \ - ghcr.io/frantjc/sindri:1.2.6 \ + ghcr.io/frantjc/sindri:1.2.7 \ --root /var/lib/sindri \ --mod Nexus/FarmGrid ``` @@ -90,7 +90,7 @@ docker run \ --volume $(pwd)/sindri:/var/lib/sindri \ --publish 2456:2456/udp \ --publish 8080:8080 \ - ghcr.io/frantjc/sindri:1.2.6 \ + ghcr.io/frantjc/sindri:1.2.7 \ --root /var/lib/sindri ``` @@ -124,7 +124,7 @@ docker run \ --publish 3567:3567/udp \ --publish 8080:8080 \ --env VALHEIM_PASSWORD=atleast5chars \ - ghcr.io/frantjc/sindri:1.2.6 \ + ghcr.io/frantjc/sindri:1.2.7 \ --root /var/lib/sindri \ --mod Nexus/FarmGrid \ --port 3567 \ @@ -143,7 +143,7 @@ docker run \ --publish 3567:3567/udp \ --publish 8080:8080 \ --env VALHEIM_PASSWORD=atleast5chars \ - ghcr.io/frantjc/sindri:1.2.6 \ + ghcr.io/frantjc/sindri:1.2.7 \ --root /var/lib/sindri \ --beta public-test \ --beta-password yesimadebackups @@ -159,7 +159,7 @@ docker run \ --publish 3567:3567/udp \ --publish 8080:8080 \ --env VALHEIM_PASSWORD=atleast5chars \ - ghcr.io/frantjc/sindri:1.2.6 \ + ghcr.io/frantjc/sindri:1.2.7 \ --root /var/lib/sindri \ --no-download ``` diff --git a/command/sindri.go b/command/sindri.go index 5fc8faf..b012fc8 100644 --- a/command/sindri.go +++ b/command/sindri.go @@ -40,7 +40,7 @@ func NewSindri() *cobra.Command { } cmd = &cobra.Command{ Use: "sindri", - Version: sindri.GetSemver(), + Version: sindri.SemVer(), SilenceErrors: true, SilenceUsage: true, PreRun: func(cmd *cobra.Command, _ []string) { diff --git a/docker-compose.yml b/docker-compose.yml index bad4e97..bea0fbe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.4" services: sindri: - image: ghcr.io/frantjc/sindri:${TAG:-1.2.6} + image: ghcr.io/frantjc/sindri:${TAG:-1.2.7} build: . ports: - 2456:2456/udp diff --git a/version.go b/version.go index 39034ba..1c3ea3c 100644 --- a/version.go +++ b/version.go @@ -5,16 +5,15 @@ import ( "strings" ) -// Semver is the semantic version of Sindri. -// Meant to be be overridden at build time, -// but kept up-to-date sometimes to best -// support `go install`. -var Semver = "1.2.6" +// VersionCore is the SemVer version core of sindri. +// Meant to be be overridden at build time, but kept +// up-to-date sometimes to best support `go install`. +var VersionCore = "1.2.7" -// GetSemver returns the semantic version of sindri as built from -// Semver and debug build info. -func GetSemver() string { - version := Semver +// SemVer returns the semantic version of forge as built +// from VersionCore and debug build info. +func SemVer() string { + semver := VersionCore if buildInfo, ok := debug.ReadBuildInfo(); ok { var ( @@ -36,15 +35,15 @@ func GetSemver() string { i = 7 } - if !strings.Contains(version, revision[:i]) { - version += "+" + revision[:i] + if !strings.Contains(semver, revision[:i]) { + semver += "+" + revision[:i] } } if modified { - version += "*" + semver += "*" } } - return version + return semver }