Skip to content

Commit 3b1b774

Browse files
committed
Support builds based on ESP-IDF tag
1 parent 4db7ea7 commit 3b1b774

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

tools/install-esp-idf.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ if [ ! -d "$IDF_PATH" ]; then
1818
idf_was_installed="1"
1919
fi
2020

21-
if [ "$IDF_COMMIT" ]; then
21+
if [ "$IDF_TAG" ]; then
22+
git -C "$IDF_PATH" checkout "tags/$IDF_TAG"
23+
idf_was_installed="1"
24+
elif [ "$IDF_COMMIT" ]; then
2225
git -C "$IDF_PATH" checkout "$IDF_COMMIT"
2326
commit_predefined="1"
2427
fi

tools/repository_dispatch.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ EVENT_JSON=`cat "$GITHUB_EVENT_PATH"`
99
action=`echo "$EVENT_JSON" | jq -r '.action'`
1010
payload=`echo "$EVENT_JSON" | jq -r '.client_payload'`
1111
branch=`echo "$payload" | jq -r '.branch'`
12+
tag=`echo "$payload" | jq -r '.tag'`
1213
commit=`echo "$payload" | jq -r '.commit'`
1314
builder=`echo "$payload" | jq -r '.builder'`
1415
arduino=`echo "$payload" | jq -r '.arduino'`
1516

16-
echo "Action: $action, Branch: $branch, Commit: $commit, Builder: $builder"
17+
echo "Action: $action, Branch: $branch, Tag: $tag, Commit: $commit, Builder: $builder, Arduino: $arduino"
1718

1819
if [ ! "$action" == "deploy" ] && [ ! "$action" == "build" ]; then
1920
echo "Bad Action $action"
@@ -26,6 +27,8 @@ if [ ! "$commit" == "" ] && [ ! "$commit" == "null" ]; then
2627
export IDF_COMMIT="$commit"
2728
else
2829
commit=""
30+
if [ ! "$tag" == "" ] && [ ! "$tag" == "null" ]; then
31+
export IDF_TAG="$tag"
2932
if [ ! "$branch" == "" ] && [ ! "$branch" == "null" ]; then
3033
export IDF_BRANCH="$branch"
3134
fi

tools/update-components.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,15 @@ if [ -z $AR_BRANCH ]; then
2626
current_branch="$GITHUB_HEAD_REF"
2727
fi
2828
echo "Current Branch: $current_branch"
29-
# Temporary to get CI working
30-
if [[ "$current_branch" == "esp-idf-v5.1" ]]; then
31-
export AR_BRANCH="esp-idf-v5.1-libs"
32-
elif [[ "$current_branch" != "master" && `git_branch_exists "$AR_COMPS/arduino" "$current_branch"` == "1" ]]; then
29+
if [[ "$current_branch" != "master" && `git_branch_exists "$AR_COMPS/arduino" "$current_branch"` == "1" ]]; then
3330
export AR_BRANCH="$current_branch"
3431
else
35-
if [ -z "$IDF_COMMIT" ]; then #commit was not specified at build time
36-
AR_BRANCH_NAME="idf-$IDF_BRANCH"
37-
else
32+
if [ "$IDF_TAG" ]; then #tag was specified at build time
33+
AR_BRANCH_NAME="idf-$IDF_TAG"
34+
elif [ "$IDF_COMMIT" ]; then #commit was specified at build time
3835
AR_BRANCH_NAME="idf-$IDF_COMMIT"
36+
else
37+
AR_BRANCH_NAME="idf-$IDF_BRANCH"
3938
fi
4039
has_ar_branch=`git_branch_exists "$AR_COMPS/arduino" "$AR_BRANCH_NAME"`
4140
if [ "$has_ar_branch" == "1" ]; then

0 commit comments

Comments
 (0)