autotest: ensure old tags in PX4NuttX and PX4Firmware don't get used

This commit is contained in:
Andrew Tridgell 2014-01-20 19:54:35 +11:00
parent ab4a5d676e
commit 0b7e96b528
1 changed files with 21 additions and 1 deletions

View File

@ -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