Improve nightly version handling (#2598)

Co-authored-by: Michael Geers <michael@geers.tv>
This commit is contained in:
Andreas Linde 2022-02-20 14:11:06 +01:00 • committed by GitHub
parent 4823b92dbc
commit 17d6a5c17c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 107 additions and 60 deletions

View file

@ -1,13 +1,14 @@
dist: release
release:
disable: true
builds:
- id: evcc
main: main.go
flags:
- -tags=release
ldflags:
- -X github.com/evcc-io/evcc/server.Version={{.Version}}.{{.Timestamp}} -X github.com/evcc-io/evcc/server.Commit={{.ShortCommit}} -s -w
- -X github.com/evcc-io/evcc/server.Version={{.Version}} -X github.com/evcc-io/evcc/server.Commit={{.ShortCommit}} -s -w
env:
- CGO_ENABLED=0
goos:
@ -18,6 +19,7 @@ builds:
- arm64
goarm:
- "6"
archives:
- builds:
- evcc
@ -29,17 +31,30 @@ archives:
format: zip
files:
- evcc.dist.yaml
name_template: "{{.ProjectName}}_{{ .Version }}.{{.Timestamp}}_{{.Os}}-{{.Arch}}{{ if .Arm }}hf{{ end }}"
name_template: "{{.ProjectName}}_{{ .Version }}_{{.Os}}-{{.Arch}}{{ if .Arm }}hf{{ end }}"
universal_binaries:
- replace: true
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Version }}.{{.Timestamp}}"
changelog:
sort: asc
filters:
exclude:
- '^chore'
- '^bump'
- '^docs:'
- '^test:'
nfpms:
- id: default
package_name: evcc
file_name_template: "{{.ProjectName}}_{{ .Version }}.{{.Timestamp}}_{{.Os}}-{{.Arch}}{{ if .Arm }}hf{{ end }}"
file_name_template: "{{.ProjectName}}_{{ .Version }}_{{.Os}}-{{.Arch}}{{ if .Arm }}hf{{ end }}"
homepage: https://evcc.io
description: EV Charge Controller
@ -57,4 +72,4 @@ nfpms:
scripts:
postinstall: ./packaging/scripts/postinstall.sh
preremove: ./packaging/scripts/preremove.sh
postremove: ./packaging/scripts/postremove.sh
postremove: ./packaging/scripts/postremove.sh