From e64d03197d368ada66323453ae93593f900253ea Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 27 Feb 2015 17:45:15 +0800 Subject: post-build-manage-buildhistory.sh: unbreak it * Default to linaro buildhistory repo * Create branch if it doesn't exist instead of failing in clone * Output change summary to stdout: The buildhistory-diff script will output a human readable summary of the changes between the two builds. Change-Id: I63dc300d944f2fe35c5e7bbf361b3cac2960a0e7 Signed-off-by: Koen Kooi --- post-build-manage-buildhistory.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'post-build-manage-buildhistory.sh') diff --git a/post-build-manage-buildhistory.sh b/post-build-manage-buildhistory.sh index a90f9ee..5c4086f 100755 --- a/post-build-manage-buildhistory.sh +++ b/post-build-manage-buildhistory.sh @@ -55,7 +55,12 @@ do esac done -if [ -z "$tree" ] || [ -z "$branch" ] ; then +if [ -z "$tree" ] ; then + tree="ssh://git@git.linaro.org/openembedded/buildhistory.git" + echo "No tree specified, defaulting to $tree" +fi + +if [ -z "$branch" ] ; then usage exit 1 fi @@ -67,12 +72,16 @@ fi if [ ! -z "$buildhistory_dir" ] && [ -d $buildhistory_dir ]; then rm -rf _buildhistory - git clone $tree -b $branch _buildhistory - cp -a $buildhistory_dir/* _buildhistory/ + git clone $tree _buildhistory + ( cd _buildhistory ; git checkout origin/$branch -b $branch || git checkout -b $branch ; cd .. ) + cp -a $buildhistory_dir/[A-z]* _buildhistory/ cd _buildhistory git add -A git commit --allow-empty -m "Build : ${BUILD_NUMBER}" git push origin HEAD:$branch + + # Output the most important changes to stdout + ${WORKSPACE}/openembedded-core/scripts/buildhistory-diff --buildhistory-dir=$PWD HEAD~1 HEAD || true else echo "Build history not found" fi -- cgit v1.2.3