mirror of https://github.com/ArduPilot/ardupilot
scripts: use AVR specific branches for builds for APM1/APM2
This commit is contained in:
parent
ec2bc5e41d
commit
1cd5b9da9b
|
@ -22,6 +22,18 @@ error_count=0
|
||||||
|
|
||||||
. config.mk
|
. config.mk
|
||||||
|
|
||||||
|
board_branch() {
|
||||||
|
board="$1"
|
||||||
|
case $board in
|
||||||
|
apm1|apm2)
|
||||||
|
echo "-AVR"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo ""
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
# checkout the right version of the tree
|
# checkout the right version of the tree
|
||||||
checkout() {
|
checkout() {
|
||||||
vehicle="$1"
|
vehicle="$1"
|
||||||
|
@ -30,26 +42,29 @@ checkout() {
|
||||||
git stash
|
git stash
|
||||||
if [ "$tag" = "latest" ]; then
|
if [ "$tag" = "latest" ]; then
|
||||||
vtag="master"
|
vtag="master"
|
||||||
vtag2="master"
|
|
||||||
else
|
else
|
||||||
vtag="$vehicle-$tag-$board"
|
vtag="$vehicle-$tag"
|
||||||
vtag2="$vehicle-$tag"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "FORCING NON-BOARD SPECIFIC BUILD"
|
# add board type specific branch extension
|
||||||
vtag=$vtag2
|
vtag2="$vtag"$(board_branch $b)
|
||||||
|
|
||||||
echo "Checkout for $vehicle for $board with tag $tag"
|
git checkout -f "$vtag2" && {
|
||||||
|
echo "Using board specific tag $vtag2"
|
||||||
git checkout -f "$vtag" || git checkout -f "$vtag2" || {
|
|
||||||
return 1
|
|
||||||
[ -f $BASEDIR/.gitmodules ] && git submodule update
|
[ -f $BASEDIR/.gitmodules ] && git submodule update
|
||||||
|
git log -1
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
[ -f $BASEDIR/.gitmodules ] && git submodule update
|
git checkout -f "$vtag" && {
|
||||||
git log -1
|
echo "Using generic tag $vtag"
|
||||||
|
[ -f $BASEDIR/.gitmodules ] && git submodule update
|
||||||
|
git log -1
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
return 0
|
echo "Failed to find tag for $vehicle $tag $board"
|
||||||
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# check if we should skip this build because we have already
|
# check if we should skip this build because we have already
|
||||||
|
|
Loading…
Reference in New Issue