From 0b7e96b5285657725aeb69df206fd3194b9cf62c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 20 Jan 2014 19:54:35 +1100 Subject: [PATCH] autotest: ensure old tags in PX4NuttX and PX4Firmware don't get used --- Tools/scripts/build_autotest.sh | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Tools/scripts/build_autotest.sh b/Tools/scripts/build_autotest.sh index 03826fce15..0019405d1c 100755 --- a/Tools/scripts/build_autotest.sh +++ b/Tools/scripts/build_autotest.sh @@ -8,10 +8,20 @@ cd $HOME/APM || exit 1 test -n "$FORCEBUILD" || { (cd APM && git fetch > /dev/null 2>&1) + newtags=$(cd APM && git fetch --tags | wc -l) oldhash=$(cd APM && git rev-parse origin/master) newhash=$(cd APM && git rev-parse HEAD) -if [ "$oldhash" = "$newhash" -a "$newtags" = "0" ]; then + +newtagspx4=$(cd PX4Firmware && git fetch --tags | wc -l) +oldhashpx4=$(cd PX4Firmware && git rev-parse origin/master) +newhashpx4=$(cd PX4Firmware && git rev-parse HEAD) + +newtagsnuttx=$(cd PX4NuttX && git fetch --tags | wc -l) +oldhashnuttx=$(cd PX4NuttX && git rev-parse origin/master) +newhashnuttx=$(cd PX4NuttX && git rev-parse HEAD) + +if [ "$oldhash" = "$newhash" -a "$newtags" = "0" -a "$oldhashpx4" = "$newhashpx4" -a "$newtagspx4" = "0" -a "$oldhashnuttx" = "$newhashnuttx" -a "$newtagsnuttx" = "0" ]; then echo "no change $oldhash $newhash `date`" >> build.log exit 0 fi @@ -85,12 +95,22 @@ rsync -a APM/Tools/autotest/web-firmware/ buildlogs/binaries/ pushd PX4Firmware git fetch origin git reset --hard origin/master +for v in ArduPlane ArduCopter APMrover2; do + git tag -d $v-beta || true + git tag -d $v-stable || true +done +git fetch origin --tags git show popd pushd PX4NuttX git fetch origin git reset --hard origin/master +for v in ArduPlane ArduCopter APMrover2; do + git tag -d $v-beta || true + git tag -d $v-stable || true +done +git fetch origin --tags git show popd