chore: monotonic package version for dev builds (#32679)
This commit is contained in:
parent
5ab5cfc2ef
commit
cc9bfc2556
2 changed files with 12 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue