Skip to content

Commit

Permalink
Pull request: all: fix snapshot release version length
Browse files Browse the repository at this point in the history
Merge in DNS/adguard-home from 2410-fix-snapshot to master

Updates AdguardTeam#2410.
Updates AdguardTeam#2412.

Squashed commit of the following:

commit 6718e01
Merge: ba5fc4c e02308d
Author: Ainar Garipov <[email protected]>
Date:   Thu Dec 10 14:36:19 2020 +0300

    Merge branch 'master' into 2410-fix-snapshot

commit ba5fc4c
Author: Ainar Garipov <[email protected]>
Date:   Thu Dec 10 13:12:12 2020 +0300

    all: fix snapshot release version length
  • Loading branch information
ainar-g committed Dec 10, 2020
1 parent e02308d commit e2738fd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}'
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit e2738fd

Please sign in to comment.