Skip to content

Commit 1a959ba

Browse files
authored
Update update-components.sh
1 parent 89fe403 commit 1a959ba

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

Diff for: tools/update-components.sh

+12-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,18 @@ source ./tools/config.sh
55
#
66
# CLONE/UPDATE ARDUINO
77
#
8-
ARDUINO_BRANCH="release/v1.0"
9-
ARDUINO_HAS_BRANCH=`git_branch_exists "$AR_COMPS/arduino" "idf-$IDF_BRANCH"`
10-
if [ "$ARDUINO_HAS_BRANCH" == "1" ]; then
11-
ARDUINO_BRANCH="idf-$IDF_BRANCH"
8+
if [ -z $ARDUINO_BRANCH ]; then
9+
has_ar_branch=`git_branch_exists "$AR_COMPS/arduino" "idf-$IDF_BRANCH"`
10+
if [ "$has_ar_branch" == "1" ]; then
11+
ARDUINO_BRANCH="idf-$IDF_BRANCH"
12+
else
13+
has_ar_branch=`git_branch_exists "$AR_COMPS/arduino" "$AR_PR_TARGET_BRANCH"`
14+
if [ "$has_ar_branch" == "1" ]; then
15+
ARDUINO_BRANCH="$AR_PR_TARGET_BRANCH"
16+
else
17+
ARDUINO_BRANCH="master"
18+
fi
19+
fi
1220
fi
1321

1422
if [ ! -d "$AR_COMPS/arduino" ]; then

0 commit comments

Comments
 (0)