Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
frantjc committed Jan 9, 2024
1 parent 670ec49 commit 568f31e
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ lint:

gen: generate

SEMVER ?= 1.2.6
SEMVER ?= 1.2.7

release:
@$(GIT) tag v$(SEMVER)
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand All @@ -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
```
Expand All @@ -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
```

Expand Down Expand Up @@ -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 \
Expand All @@ -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
Expand All @@ -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
```
2 changes: 1 addition & 1 deletion command/sindri.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 12 additions & 13 deletions version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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
}

0 comments on commit 568f31e

Please sign in to comment.