@@ -19,38 +19,8 @@ if [ ! -d "$AR_COMPS/arduino" ]; then
1919 git clone $AR_REPO_URL " $AR_COMPS /arduino"
2020fi
2121
22- if [ -z $AR_BRANCH ]; then
23- if [ -z $GITHUB_HEAD_REF ]; then
24- current_branch=` git branch --show-current`
25- else
26- current_branch=" $GITHUB_HEAD_REF "
27- fi
28- echo " Current Branch: $current_branch "
29- if [[ " $current_branch " != " master" && ` git_branch_exists " $AR_COMPS /arduino" " $current_branch " ` == " 1" ]]; then
30- export AR_BRANCH=" $current_branch "
31- else
32- if [ -z " $IDF_COMMIT " ]; then # commit was not specified at build time
33- AR_BRANCH_NAME=" idf-$IDF_BRANCH "
34- else
35- AR_BRANCH_NAME=" idf-$IDF_COMMIT "
36- fi
37- has_ar_branch=` git_branch_exists " $AR_COMPS /arduino" " $AR_BRANCH_NAME " `
38- if [ " $has_ar_branch " == " 1" ]; then
39- export AR_BRANCH=" $AR_BRANCH_NAME "
40- else
41- has_ar_branch=` git_branch_exists " $AR_COMPS /arduino" " $AR_PR_TARGET_BRANCH " `
42- if [ " $has_ar_branch " == " 1" ]; then
43- export AR_BRANCH=" $AR_PR_TARGET_BRANCH "
44- fi
45- fi
46- fi
47- fi
48-
49- if [ " $AR_BRANCH " ]; then
50- git -C " $AR_COMPS /arduino" checkout " $AR_BRANCH " && \
51- git -C " $AR_COMPS /arduino" fetch && \
52- git -C " $AR_COMPS /arduino" pull --ff-only
53- fi
22+ git -C " $AR_COMPS /arduino" fetch && \
23+ git -C " $AR_COMPS /arduino" checkout 2.0.6
5424if [ $? -ne 0 ]; then exit 1; fi
5525
5626#
@@ -60,13 +30,14 @@ echo "Updating ESP32 Camera..."
6030if [ ! -d " $AR_COMPS /esp32-camera" ]; then
6131 git clone $CAMERA_REPO_URL " $AR_COMPS /esp32-camera"
6232else
63- git -C " $AR_COMPS /esp32-camera" fetch && \
64- git -C " $AR_COMPS /esp32-camera" pull --ff-only
33+ git -C " $AR_COMPS /esp32-camera" fetch
6534fi
35+ if [ $? -ne 0 ]; then exit 1; fi
6636# this is a temp measure to fix build issue
6737# if [ -f "$AR_COMPS/esp32-camera/idf_component.yml" ]; then
6838# rm -rf "$AR_COMPS/esp32-camera/idf_component.yml"
6939# fi
40+ git -C " $AR_COMPS /esp32-camera" checkout " $( grep -e ^esp32-camera: $AR_COMPS /arduino/tools/sdk/versions.txt | cut -d ' ' -f 3) "
7041if [ $? -ne 0 ]; then exit 1; fi
7142
7243#
@@ -76,9 +47,9 @@ echo "Updating ESP-DL..."
7647if [ ! -d " $AR_COMPS /esp-dl" ]; then
7748 git clone $DL_REPO_URL " $AR_COMPS /esp-dl"
7849else
79- git -C " $AR_COMPS /esp-dl" fetch && \
80- git -C " $AR_COMPS /esp-dl" pull --ff-only
50+ git -C " $AR_COMPS /esp-dl" fetch
8151fi
52+ git -C " $AR_COMPS /esp-dl" checkout " $( grep -e ^esp-dl: $AR_COMPS /arduino/tools/sdk/versions.txt | cut -d ' ' -f 3) "
8253if [ $? -ne 0 ]; then exit 1; fi
8354
8455#
@@ -88,9 +59,10 @@ echo "Updating ESP-SR..."
8859if [ ! -d " $AR_COMPS /esp-sr" ]; then
8960 git clone $SR_REPO_URL " $AR_COMPS /esp-sr"
9061else
91- git -C " $AR_COMPS /esp-sr" fetch && \
92- git -C " $AR_COMPS /esp-sr" pull --ff-only
62+ git -C " $AR_COMPS /esp-sr" fetch
9363fi
64+ git -C " $AR_COMPS /esp-dl" checkout " $( grep -e ^esp-dl: $AR_COMPS /arduino/tools/sdk/versions.txt | cut -d ' ' -f 3) "
65+ if [ $? -ne 0 ]; then exit 1; fi
9466# this is a temp measure to fix build issue
9567if [ -f " $AR_COMPS /esp-sr/idf_component.yml" ]; then
9668 rm -rf " $AR_COMPS /esp-sr/idf_component.yml"
@@ -102,42 +74,42 @@ if [ $? -ne 0 ]; then exit 1; fi
10274#
10375echo " Updating ESP-LITTLEFS..."
10476if [ ! -d " $AR_COMPS /esp_littlefs" ]; then
105- git clone $LITTLEFS_REPO_URL " $AR_COMPS /esp_littlefs" && \
106- git -C " $AR_COMPS /esp_littlefs" submodule update --init --recursive
77+ git clone $LITTLEFS_REPO_URL " $AR_COMPS /esp_littlefs"
10778else
108- git -C " $AR_COMPS /esp_littlefs" fetch && \
109- git -C " $AR_COMPS /esp_littlefs" pull --ff-only && \
110- git -C " $AR_COMPS /esp_littlefs" submodule update --init --recursive
79+ git -C " $AR_COMPS /esp_littlefs" fetch
11180fi
11281if [ $? -ne 0 ]; then exit 1; fi
82+ git -C " $AR_COMPS /esp_littlefs" checkout " $( grep -e ^esp_littlefs: $AR_COMPS /arduino/tools/sdk/versions.txt | cut -d ' ' -f 3) " && \
83+ git -C " $AR_COMPS /esp_littlefs" submodule update --init --recursive
84+ if [ $? -ne 0 ]; then exit 1; fi
11385
11486#
11587# CLONE/UPDATE ESP-RAINMAKER
11688#
11789echo " Updating ESP-RainMaker..."
11890if [ ! -d " $AR_COMPS /esp-rainmaker" ]; then
119- git clone $RMAKER_REPO_URL " $AR_COMPS /esp-rainmaker" && \
120- git -C " $AR_COMPS /esp-rainmaker" submodule update --init --recursive
91+ git clone $RMAKER_REPO_URL " $AR_COMPS /esp-rainmaker"
12192else
122- git -C " $AR_COMPS /esp-rainmaker" fetch && \
123- git -C " $AR_COMPS /esp-rainmaker" pull --ff-only && \
124- git -C " $AR_COMPS /esp-rainmaker" submodule update --init --recursive
93+ git -C " $AR_COMPS /esp-rainmaker" fetch
12594fi
12695if [ $? -ne 0 ]; then exit 1; fi
96+ git -C " $AR_COMPS /esp-rainmaker" checkout " $( grep -e ^esp-rainmaker: $AR_COMPS /arduino/tools/sdk/versions.txt | cut -d ' ' -f 3) " && \
97+ git -C " $AR_COMPS /esp-rainmaker" submodule update --init --recursive
98+ if [ $? -ne 0 ]; then exit 1; fi
12799
128100#
129101# CLONE/UPDATE ESP-INSIGHTS
130102#
131103echo " Updating ESP-Insights..."
132104if [ ! -d " $AR_COMPS /esp-insights" ]; then
133- git clone $INSIGHTS_REPO_URL " $AR_COMPS /esp-insights" && \
134- git -C " $AR_COMPS /esp-insights" submodule update --init --recursive
105+ git clone $INSIGHTS_REPO_URL " $AR_COMPS /esp-insights"
135106else
136- git -C " $AR_COMPS /esp-insights" fetch && \
137- git -C " $AR_COMPS /esp-insights" pull --ff-only && \
138- git -C " $AR_COMPS /esp-insights" submodule update --init --recursive
107+ git -C " $AR_COMPS /esp-insights" fetch
139108fi
140109if [ $? -ne 0 ]; then exit 1; fi
110+ git -C " $AR_COMPS /esp-insights" checkout " $( grep -e ^esp-insights: $AR_COMPS /arduino/tools/sdk/versions.txt | cut -d ' ' -f 3) " && \
111+ git -C " $AR_COMPS /esp-insights" submodule update --init --recursive
112+ if [ $? -ne 0 ]; then exit 1; fi
141113
142114#
143115# CLONE/UPDATE ESP-DSP
@@ -146,10 +118,11 @@ echo "Updating ESP-DSP..."
146118if [ ! -d " $AR_COMPS /esp-dsp" ]; then
147119 git clone $DSP_REPO_URL " $AR_COMPS /esp-dsp"
148120else
149- git -C " $AR_COMPS /esp-dsp" fetch && \
150- git -C " $AR_COMPS /esp-dsp" pull --ff-only
121+ git -C " $AR_COMPS /esp-dsp" fetch
151122fi
152123if [ $? -ne 0 ]; then exit 1; fi
124+ git -C " $AR_COMPS /esp-dsp" checkout " $( grep -e ^esp-dsp: $AR_COMPS /arduino/tools/sdk/versions.txt | cut -d ' ' -f 3) "
125+ if [ $? -ne 0 ]; then exit 1; fi
153126
154127#
155128# CLONE/UPDATE TINYUSB
@@ -158,8 +131,8 @@ echo "Updating TinyUSB..."
158131if [ ! -d " $AR_COMPS /arduino_tinyusb/tinyusb" ]; then
159132 git clone $TINYUSB_REPO_URL " $AR_COMPS /arduino_tinyusb/tinyusb"
160133else
161- git -C " $AR_COMPS /arduino_tinyusb/tinyusb" fetch && \
162- git -C " $AR_COMPS /arduino_tinyusb/tinyusb" pull --ff-only
134+ git -C " $AR_COMPS /arduino_tinyusb/tinyusb" fetch
163135fi
164136if [ $? -ne 0 ]; then exit 1; fi
165-
137+ git -C " $AR_COMPS /arduino_tinyusb/tinyusb" checkout " $( grep -e ^tinyusb: $AR_COMPS /arduino/tools/sdk/versions.txt | cut -d ' ' -f 3) "
138+ if [ $? -ne 0 ]; then exit 1; fi
0 commit comments