diff --git a/.goreleaser.yml b/.goreleaser.yml index 7c132f87..c533712b 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -105,3 +105,11 @@ 'checksum': 'name_template': 'checksums.txt' + +'snapshot': + # TODO(a.garipov): A temporary solution to trim the prerelease versions. + # A real solution would consist of making a better versioning scheme that also + # doesn't break SemVer or Snapcraft. + # + # See https://github.com/AdguardTeam/AdGuardHome/issues/2412. + 'name_template': '{{ slice .Tag 0 8 }}-SNAPSHOT-{{ .ShortCommit }}' diff --git a/Makefile b/Makefile index 683a92b1..1848fe34 100644 --- a/Makefile +++ b/Makefile @@ -66,7 +66,9 @@ endif # Version properties COMMIT=$(shell git rev-parse --short HEAD) -TAG_NAME=$(shell git describe --abbrev=0) +# TODO(a.garipov): The cut call is a temporary solution to trim +# prerelease versions. See the comment in .goreleaser.yml. +TAG_NAME=$(shell git describe --abbrev=0 | cut -c 1-8) RELEASE_VERSION=$(TAG_NAME) SNAPSHOT_VERSION=$(RELEASE_VERSION)-SNAPSHOT-$(COMMIT)