summaryrefslogtreecommitdiff
path: root/post-build-manage-buildhistory.sh
diff options
context:
space:
mode:
authorKoen Kooi <koen.kooi@linaro.org>2015-02-27 17:45:15 +0800
committerKoen Kooi <koen.kooi@linaro.org>2015-04-07 12:15:22 +0200
commite64d03197d368ada66323453ae93593f900253ea (patch)
tree2cc6b2bdda06b8d617bff71de4d7e92c9d518bfd /post-build-manage-buildhistory.sh
parent2c3807c34c9726c33674ec5ed2fd8fc9bfe0d2bb (diff)
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 <koen.kooi@linaro.org>
Diffstat (limited to 'post-build-manage-buildhistory.sh')
-rwxr-xr-xpost-build-manage-buildhistory.sh15
1 files changed, 12 insertions, 3 deletions
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