diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2012-12-18 02:12:30 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2013-04-05 01:05:55 +0200 |
commit | b0f162b7ddb76694e96125424beecca48a824dfa (patch) | |
tree | 2b50fbdc7dd30d840e4ec88de0fbc1223f0125ea /bibisect/Makefile | |
parent | e2139d955539cdfe8d9b6b37a36fa5c5868cbc55 (diff) |
add tagbased build too
Diffstat (limited to 'bibisect/Makefile')
-rwxr-xr-x | bibisect/Makefile | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/bibisect/Makefile b/bibisect/Makefile index f90cde9d..79f61029 100755 --- a/bibisect/Makefile +++ b/bibisect/Makefile @@ -32,6 +32,14 @@ include bibisect.cfg BINREPO:=$(WORKDIR)/binrepo BUILDDIR:=$(WORKDIR)/build ARTIFACTDIR:=$(WORKDIR)/artifact +ORDERMODE?=master + +ifeq ($(ORDERMODE),master) +SOURCETYPE:=hash +endif +ifeq ($(ORDERMODE),tags) +SOURCETYPE:=tag +endif .DEFAULT_GOAL=all .PHONY: all clean @@ -47,7 +55,7 @@ cd $(BINREPO) && git checkout -f $(1) && \ cd $(ARTIFACTDIR) && \ git --git-dir=$(BINREPO)/.git --work-tree=$(ARTIFACTDIR) add -A && \ git --git-dir=$(BINREPO)/.git --work-tree=$(ARTIFACTDIR) commit -F $(ARTIFACTDIR)/commitmsg && \ -git --git-dir=$(BINREPO)/.git tag source-hash-$(2) && \ +git --git-dir=$(BINREPO)/.git tag source-$(SOURCETYPE)-$(2) && \ echo "$(2) $(3)" > $@; endef @@ -69,6 +77,8 @@ ifneq ($(MAKECMDGOALS),clean) include $(WORKDIR)/buildorder endif + +ifeq ($(ORDERMODE),master) $(WORKDIR)/buildorder: $(WORKDIR)/init git --git-dir=$(SOURCEREPO) rev-list --reverse $(FROM)..$(TO) | \ awk \ @@ -76,6 +86,14 @@ $(WORKDIR)/buildorder: $(WORKDIR)/init NR % $(INTERVAL) == 1 { current="$(WORKDIR)/milestone/" $$0; printf "%s: %s\n", current, last; last = current} \ END { printf "$(TO): %s\nall: $(TO)", last }' > $@ +endif + +ifeq ($(ORDERMODE),tags) +$(WORKDIR)/buildorder: $(WORKDIR)/init + git --git-dir=$(SOURCEREPO) tag|grep ^libreoffice|sed -e 's/\./-/g'|paste - <(git --git-dir=$(SOURCEREPO) tag|grep ^libreoffice)|sort|cut -f2 > $@ + +endif + $(WORKDIR)/init: mkdir -p $(WORKDIR)/milestone mkdir -p $(BUILDDIR) |