Skip to content
This repository was archived by the owner on Sep 16, 2018. It is now read-only.

Commit ca8e671

Browse files
committed
Use tags if available, otherwise use branch
1 parent 172aef8 commit ca8e671

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11

22
TAG=$(shell git name-rev --tags --name-only $(shell git rev-parse HEAD))
3+
BRANCH=$(shell git rev-parse --abbrev-ref HEAD)
4+
TREE=$(shell test $(TAG) = undefined && echo $(BRANCH) || echo $(TAG))
35

46
distclean:
57

@@ -15,10 +17,11 @@ test:
1517
coverage report -m
1618

1719
deb:
18-
git checkout $(TAG)
20+
echo Using $(TREE)
21+
git checkout $(TREE)
1922
cp debian/changelog debian/changelog.old
2023
gbp dch --snapshot --auto --ignore-branch
2124
rm -f ../dhmon_*.orig.tar.gz
22-
gbp buildpackage --git-upstream-tree=$(TAG) --git-submodules \
25+
gbp buildpackage --git-upstream-tree=$(TREE) --git-submodules \
2326
--git-ignore-new --git-ignore-branch --git-builder='debuild -i -I -us -uc'
2427
mv debian/changelog.old debian/changelog

0 commit comments

Comments
 (0)