chore: monotonic package version for dev builds (#32679)

This commit is contained in:
andig 2026-08-10 09:44:42 +02:00 • committed by GitHub
parent 5ab5cfc2ef
commit cc9bfc2556
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 6 deletions

View file

@ -16,7 +16,8 @@ builds:
- -trimpath
- -tags=release
ldflags:
- -X github.com/evcc-io/evcc/util.Version={{ .Version }} -s -w
# 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
env:
- CGO_ENABLED=0
goos:
@ -63,8 +64,10 @@ checksum:
name_template: "checksums.txt"
snapshot:
# semver pre-release of the upcoming version
version_template: "{{ incminor .Version }}-dev+{{ .ShortCommit }}"
# 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 }}"
changelog:
sort: asc