@@ -14,10 +14,8 @@ export TARGET="esp32"
14
14
BUILD_TYPE=" all"
15
15
SKIP_ENV=0
16
16
COPY_OUT=0
17
- ARCHIVE_OUT=0
18
- if [ -z $DEPLOY_OUT ]; then
19
- DEPLOY_OUT=0
20
- fi
17
+ ARCHIVE_OUT=1
18
+ DEPLOY_OUT=0
21
19
22
20
function print_help() {
23
21
echo " Usage: build.sh [-s] [-A <arduino_branch>] [-I <idf_branch>] [-i <idf_commit>] [-c <path>] [-t <target>] [-b <build|menuconfig|reconfigure|idf-libs|copy-bootloader|mem-variant>] [config ...]"
@@ -26,8 +24,6 @@ function print_help() {
26
24
echo " -I Set which branch of ESP-IDF to be used for compilation"
27
25
echo " -i Set which commit of ESP-IDF to be used for compilation"
28
26
echo " -e Archive the build to dist"
29
- echo " -d Deploy the build to github arduino-esp32"
30
- echo " -c Set the arduino-esp32 folder to copy the result to. ex. '$HOME /Arduino/hardware/espressif/esp32'"
31
27
echo " -t Set the build target(chip) ex. 'esp32s3' or select multiple targets(chips) by separating them with comma ex. 'esp32,esp32s3,esp32c3'"
32
28
echo " -b Set the build type. ex. 'build' to build the project and prepare for uploading to a board"
33
29
echo " ... Specify additional configs to be applied. ex. 'qio 80m' to compile for QIO Flash@80MHz. Requires -b"
@@ -39,16 +35,9 @@ while getopts ":A:I:i:c:t:b:sde" opt; do
39
35
s )
40
36
SKIP_ENV=1
41
37
;;
42
- d )
43
- DEPLOY_OUT=1
44
- ;;
45
38
e )
46
39
ARCHIVE_OUT=1
47
40
;;
48
- c )
49
- export ESP32_ARDUINO=" $OPTARG "
50
- COPY_OUT=1
51
- ;;
52
41
A )
53
42
export AR_BRANCH=" $OPTARG "
54
43
;;
@@ -63,11 +52,11 @@ while getopts ":A:I:i:c:t:b:sde" opt; do
63
52
;;
64
53
b )
65
54
b=$OPTARG
66
- if [ " $b " != " build" ] &&
67
- [ " $b " != " menuconfig" ] &&
68
- [ " $b " != " reconfigure" ] &&
69
- [ " $b " != " idf-libs" ] &&
70
- [ " $b " != " copy-bootloader" ] &&
55
+ if [ " $b " != " build" ] &&
56
+ [ " $b " != " menuconfig" ] &&
57
+ [ " $b " != " reconfigure" ] &&
58
+ [ " $b " != " idf-libs" ] &&
59
+ [ " $b " != " copy-bootloader" ] &&
71
60
[ " $b " != " mem-variant" ]; then
72
61
print_help
73
62
fi
@@ -134,7 +123,7 @@ if [ "$BUILD_TYPE" != "all" ]; then
134
123
# Skip building for targets that are not in the $TARGET array
135
124
continue
136
125
fi
137
-
126
+
138
127
configs=" configs/defconfig.common;configs/defconfig.$target "
139
128
for defconf in ` echo " $target_json " | jq -c ' .features[]' | tr -d ' "' ` ; do
140
129
configs=" $configs ;configs/defconfig.$defconf "
@@ -188,7 +177,7 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do
188
177
continue
189
178
fi
190
179
fi
191
-
180
+
192
181
# Skip chips that should not be a part of the final libs
193
182
# WARNING!!! this logic needs to be updated when cron builds are split into jobs
194
183
if [ " $TARGET " = " all" ] && [ $target_skip -eq 1 ]; then
@@ -261,6 +250,7 @@ for component in `ls "$AR_COMPS"`; do
261
250
done
262
251
# esp32-camera version
263
252
component_version=" esp32-camera: " $( git -C " $AR_COMPS /esp32-camera" symbolic-ref --short HEAD || git -C " $AR_COMPS /esp32-camera" tag --points-at HEAD) " " $( git -C " $AR_COMPS /esp32-camera" rev-parse --short HEAD)
253
+ echo $component_version >> " $AR_TOOLS /esp32-arduino-libs/versions.txt"
264
254
# managed components version
265
255
for component in ` ls " $AR_MANAGED_COMPS " ` ; do
266
256
if [ -d " $AR_MANAGED_COMPS /$component /.git" ]; then
@@ -274,13 +264,6 @@ done
274
264
275
265
export IDF_COMMIT=$( git -C " $IDF_PATH " rev-parse --short HEAD)
276
266
277
- # update package_esp32_index.template.json
278
- # if [ "$BUILD_TYPE" = "all" ]; then
279
- # python3 ./tools/gen_tools_json.py -i "$IDF_PATH" -j "$AR_COMPS/arduino/package/package_esp32_index.template.json" -o "$AR_OUT/"
280
- # python3 ./tools/gen_tools_json.py -i "$IDF_PATH" -o "$TOOLS_JSON_OUT/"
281
- # if [ $? -ne 0 ]; then exit 1; fi
282
- # fi
283
-
284
267
# Generate PlatformIO library manifest file
285
268
if [ " $BUILD_TYPE " = " all" ]; then
286
269
python3 ./tools/gen_pio_lib_manifest.py -o " $TOOLS_JSON_OUT /" -s " v$IDF_VERSION " -c " $IDF_COMMIT "
@@ -304,20 +287,7 @@ echo "#define ARDUINO_ESP32_GIT_VER 0x$AR_Commit_short
304
287
#define ARDUINO_ESP32_RELEASE_$AR_VERSION_UNDERSCORE
305
288
#define ARDUINO_ESP32_RELEASE \" $AR_VERSION_UNDERSCORE \" " >> " $AR_ROOT /core_version.h"
306
289
307
- # copy everything to arduino-esp32 installation
308
- if [ $COPY_OUT -eq 1 ] && [ -d " $ESP32_ARDUINO " ]; then
309
- ./tools/copy-to-arduino.sh
310
- if [ $? -ne 0 ]; then exit 1; fi
311
- fi
312
-
313
- # push changes to esp32-arduino-libs and create pull request into arduino-esp32
314
- if [ $DEPLOY_OUT -eq 1 ]; then
315
- ./tools/push-to-arduino.sh
316
- if [ $? -ne 0 ]; then exit 1; fi
317
- fi
318
-
319
- # archive the build
320
- if [ " $BUILD_TYPE " = " all" ]; then
321
- ./tools/archive-build.sh
290
+ if [ $ARCHIVE_OUT -eq 1 ]; then
291
+ ./tools/archive-build.sh " $TARGET "
322
292
if [ $? -ne 0 ]; then exit 1; fi
323
293
fi
0 commit comments