Compare commits

..

No commits in common. "12b01a2757190b02c5c359e83f41664ff6286fcd" and "6a3919e95ea63c97eef471b5e6078f5e3659905f" have entirely different histories.

5 changed files with 7 additions and 45 deletions

View file

@ -15,6 +15,8 @@ builds:
- arm64
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X git.smsvc.net/pomodoro/GoTomato/internal/metadata.GoTomatoVersion={{.Version}}
upx:
- enabled: true
@ -23,9 +25,6 @@ upx:
changelog:
use: gitea
filters:
exclude:
- "chore: bump version to"
archives:
- format: binary

View file

@ -1,27 +0,0 @@
version: '3'
vars:
RELEASE:
sh: svu next --strip-prefix
VERSIONFILE: version.txt
COMMITMSG: "chore: bump version to v{{.RELEASE}}"
tasks:
release:tag:
cmds:
- git tag v{{.RELEASE}}
release:file:
cmds:
- echo {{.RELEASE}} >{{.VERSIONFILE}}
- git add {{.VERSIONFILE}}
- git commit -m "{{.COMMITMSG}}"
release:push:
aliases: [dorelease]
cmds:
- task: release:file
- task: release:tag
- git push
- git push --tags
- goreleaser release

View file

@ -28,8 +28,8 @@ func Start() {
// show server and protocl version and exit
if *showVersionFlag {
fmt.Printf("GoTomato v%s\n", metadata.GoTomatoVersion)
fmt.Printf("Protocol-Version: v%s\n", metadata.ProtocolVersion)
fmt.Println("Server-Version:", metadata.GoTomatoVersion)
fmt.Println("Protocol-Version:", metadata.ProtocolVersion)
os.Exit(0)
}

View file

@ -1,16 +1,7 @@
package metadata
import (
"os"
"strings"
)
import "strings"
func getVersion() string {
content, _ := os.ReadFile("version.txt")
version := strings.TrimSpace(string(content))
return version
}
var GoTomatoVersion = getVersion() // The GoTomato version
// This will be overwritten by goreleaser on build
var GoTomatoVersion = "devel" // The GoTomato version
var ProtocolVersion = strings.Split(GoTomatoVersion, ".")[0] // The protocol version

View file

@ -1 +0,0 @@
devel