launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #29901
[Merge] ~cjwatson/launchpad:old-git-compatibility into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:old-git-compatibility into launchpad:master.
Commit message:
Restore compatibility with xenial's git
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/440779
Calling `git branch --show-current` from the `Makefile` produces ugly warnings on xenial systems. I don't _think_ it causes a hard failure except when publishing deployment artifacts to Swift (which we only do on focal anyway), but better safe than sorry.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:old-git-compatibility into launchpad:master.
diff --git a/Makefile b/Makefile
index f60189b..ac085e8 100644
--- a/Makefile
+++ b/Makefile
@@ -88,7 +88,10 @@ PIP_BIN = \
# Create archives in labelled directories (e.g.
# <rev-id>/$(PROJECT_NAME).tar.gz)
-GIT_BRANCH := $(shell git branch --show-current)
+# XXX cjwatson 2023-04-11: Should be "git branch --show-current", but
+# xenial's git doesn't support that. Use the more concise form once we
+# require focal.
+GIT_BRANCH := $(shell git branch | sed -n 's/^\* //p')
TARBALL_REVISION ?= $(shell git rev-parse HEAD)
ifeq ($(GIT_BRANCH),db-devel)
TARBALL_SUFFIX := db