From 9fb6bf82c7cb7bb152ec5bfb4812720be549cd80 Mon Sep 17 00:00:00 2001 From: Ainar Garipov Date: Thu, 24 Dec 2020 18:02:56 +0300 Subject: [PATCH] Pull request: all: improve prerelease version selection Merge in DNS/adguard-home from fix-prereleases to master Squashed commit of the following: commit 34424e41a0d4f1e22a0dede91e0de1b463d08a0a Merge: 02e832fc0 6f50a4c96 Author: Ainar Garipov Date: Thu Dec 24 17:46:43 2020 +0300 Merge branch 'master' into fix-prereleases commit 02e832fc02dc197e40997bf566081b6d8f54420e Author: Ainar Garipov Date: Wed Dec 23 17:27:37 2020 +0300 all: improve prerelease version selection --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2bdee3550b0..27247fe6fc0 100644 --- a/Makefile +++ b/Makefile @@ -67,10 +67,11 @@ 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 @@ -78,6 +79,8 @@ 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