Skip to content

Commit

Permalink
Pull request: all: improve prerelease version selection
Browse files Browse the repository at this point in the history
Merge in DNS/adguard-home from fix-prereleases to master

Squashed commit of the following:

commit 34424e4
Merge: 02e832f 6f50a4c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Dec 24 17:46:43 2020 +0300

    Merge branch 'master' into fix-prereleases

commit 02e832f
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Dec 23 17:27:37 2020 +0300

    all: improve prerelease version selection
  • Loading branch information
ainar-g committed Dec 24, 2020
1 parent 6f50a4c commit 9fb6bf8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Expand Up @@ -67,17 +67,20 @@ endif

# Version properties
COMMIT=$(shell git rev-parse --short HEAD)
TAG_NAME=$(shell git describe --abbrev=0)
PRERELEASE_VERSION=$(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)
RELEASE_VERSION=$(shell git describe --abbrev=0 | cut -c 1-8)
SNAPSHOT_VERSION=$(RELEASE_VERSION)-SNAPSHOT-$(COMMIT)

# Set proper version
VERSION=
ifeq ($(TAG_NAME),$(shell git describe --abbrev=4))
ifeq ($(CHANNEL),edge)
VERSION=$(SNAPSHOT_VERSION)
else ifeq ($(CHANNEL),beta)
VERSION=$(PRERELEASE_VERSION)
else
VERSION=$(RELEASE_VERSION)
endif
Expand Down

0 comments on commit 9fb6bf8

Please sign in to comment.