chore: make dev versions increase monotonically (#33205)

This commit is contained in:
andig 2026-08-26 21:11:46 +02:00 • committed by GitHub
parent 01ffc7d12f
commit 10b0c99f17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 32 additions and 47 deletions

View file

@ -16,8 +16,7 @@ builds:
- -trimpath
- -tags=release
ldflags:
# the package version carries a timestamp for ordering, the reported version does not
- -X github.com/evcc-io/evcc/util.Version={{ if .IsSnapshot }}{{ incminor .Tag }}-dev+{{ .ShortCommit }}{{ else }}{{ .Version }}{{ end }} -s -w
- -X github.com/evcc-io/evcc/util.Version={{ .Version }} -s -w
env:
- CGO_ENABLED=0
goos:
@ -77,10 +76,9 @@ checksum:
name_template: "checksums.txt"
snapshot:
# semver pre-release of the upcoming version. The timestamp makes the package
# version increase monotonically: apt compares it numerically, while the commit
# alone would sort randomly.
version_template: "{{ incminor .Version }}-dev.{{ .Timestamp }}+{{ .ShortCommit }}"
# semver pre-release of the upcoming version, the timestamp keeps the package
# version increasing monotonically for apt
version_template: "{{ incminor .Version }}-dev.{{ .Timestamp }}"
changelog:
sort: asc