On Thu, Apr 30, 2020 at 03:27:44PM -0000, Gitlab Bridge wrote:
From: Jeremy Cline <jcline(a)redhat.com>
ARK's master branch tracks Linus's master branch, so drop the check for
a remote named "linus" (which might be wrong anyway) and use the local
master branch to calculate the snapshot.
While this does assume that the local master branch is up-to-date,
that's better than trying to guess the correct remote name and can be
easily scripted.
Cc: Frantisek Hrbata <fhrbata(a)redhat.com>
Cc: Rado Vrbovsky <rvrbovsk(a)redhat.com>
Cc: Jeremy Cline <jcline(a)redhat.com>
Cc: Luis Claudio Goncalves <lgoncalv(a)redhat.com>
Cc: Denys Vlasenko <dvlasenk(a)redhat.com>
Cc: "Herton R. Krzesinski" <herton(a)redhat.com>
Cc: Juri Lelli <jlelli(a)redhat.com>
Cc: Jan Stancek <jstancek(a)redhat.com>
Cc: Clark Williams <williams(a)redhat.com>
Signed-off-by: Jeremy Cline <jcline(a)redhat.com>
---
redhat/Makefile.common | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/redhat/Makefile.common b/redhat/Makefile.common
index a3b16c8a50f2..d980847aacc7 100644
--- a/redhat/Makefile.common
+++ b/redhat/Makefile.common
@@ -41,17 +41,11 @@ else
VERSION_ON_UPSTREAM:=0
endif
ifeq ($(VERSION_ON_UPSTREAM),1)
- # In order to do a snapshot properly, we need to have a remote set up
- # to track upstream.
- _HAVE_UPSTREAM_REMOTE:=$(shell git remote | grep -wc linus)
- ifeq ($(_HAVE_UPSTREAM_REMOTE),1)
- MERGE_BASE:=$(shell git merge-base HEAD linus/master)
- TAG:=$(shell git describe $(MERGE_BASE))
- # a snapshot off of a tagged git is of the form [tag]-[cnt]-g[hash]
- SNAPSHOT:=$(shell echo $(TAG) | grep -c '\-g')
- else
- SNAPSHOT:=0
- endif
+ # master is expected to track mainline.
+ MERGE_BASE:=$(shell git merge-base HEAD master)
+ TAG:=$(shell git describe $(MERGE_BASE))
+ # a snapshot off of a tagged git is of the form [tag]-[cnt]-g[hash]
+ SNAPSHOT:=$(shell echo $(TAG) | grep -c '\-g')
else
SNAPSHOT:=0
endif
--
2.26.2
Acked-by: Herton R. Krzesinski <herton(a)redhat.com>
--
[]'s
Herton