Patchwork [4/7] classes/buildhistory: tag last 3 build revisions

login
register
mail settings
Submitter Paul Eggleton
Date Aug. 15, 2013, 5:04 p.m.
Message ID <2883c21f067f90bd23085ddff9ae589714e99e8d.1376585082.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/55883/
State Accepted
Commit 9512f3787295d662678c2943da31197c8df39e99
Headers show

Comments

Paul Eggleton - Aug. 15, 2013, 5:04 p.m.
This makes it easier to obtain the difference from the last three
builds particularly where a single build might account for more than one
commit in the buildhistory git repository (e.g. if package and image
changes occurred).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/buildhistory.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

Patch

diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 6fb1ba6..e3f9201 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -518,6 +518,10 @@  END
 		# Initialise the repo if necessary
 		if [ ! -d .git ] ; then
 			git init -q
+		else
+			git tag -f build-minus-3 build-minus-2 > /dev/null 2>&1 || true
+			git tag -f build-minus-2 build-minus-1 > /dev/null 2>&1 || true
+			git tag -f build-minus-1 > /dev/null 2>&1 || true
 		fi
 		# Check if there are new/changed files to commit (other than metadata-revs)
 		repostatus=`git status --porcelain | grep -v " metadata-revs$"`