Skip to content

Commit 5b950ae

Browse files
authored
Update update-components.sh
1 parent 1b7219b commit 5b950ae

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tools/update-components.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,14 @@ if [ -z $AR_BRANCH ]; then
2323
if [[ "$current_branch" != "master" && `git_branch_exists "$AR_COMPS/arduino" "$current_branch"` == "1" ]]; then
2424
export AR_BRANCH="$current_branch"
2525
else
26-
has_ar_branch=`git_branch_exists "$AR_COMPS/arduino" "idf-$IDF_BRANCH"`
26+
if [ -z "$IDF_COMMIT" ]; then #commit was not specified at build time
27+
AR_BRANCH_NAME="idf-$IDF_BRANCH"
28+
else
29+
AR_BRANCH_NAME="idf-$IDF_COMMIT"
30+
fi
31+
has_ar_branch=`git_branch_exists "$AR_COMPS/arduino" "$AR_BRANCH_NAME"`
2732
if [ "$has_ar_branch" == "1" ]; then
28-
export AR_BRANCH="idf-$IDF_BRANCH"
33+
export AR_BRANCH="$AR_BRANCH_NAME"
2934
else
3035
has_ar_branch=`git_branch_exists "$AR_COMPS/arduino" "$AR_PR_TARGET_BRANCH"`
3136
if [ "$has_ar_branch" == "1" ]; then

0 commit comments

Comments
 (0)