Skip to content

Commit 6b1ee5a

Browse files
authored
Update build.sh
1 parent dc883b4 commit 6b1ee5a

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

build.sh

+24-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if ! [ -x "$(command -v git)" ]; then
1010
exit 1
1111
fi
1212

13-
TARGET="esp32s3"
13+
TARGET="all"
1414
BUILD_TYPE="all"
1515
SKIP_ENV=0
1616
COPY_OUT=0
@@ -144,8 +144,8 @@ mkdir -p "$AR_TOOLS/esp32-arduino-libs"
144144
rm -rf release-info.txt
145145
IDF_Commit_short=$(git -C "$IDF_PATH" rev-parse --short HEAD || echo "")
146146
AR_Commit_short=$(git -C "$AR_COMPS/arduino" rev-parse --short HEAD || echo "")
147-
echo "Framework built from
148-
- $IDF_REPO branch [$IDF_BRANCH](https://github.com/$IDF_REPO/tree/$IDF_BRANCH) commit [$IDF_Commit_short](https://github.com/$IDF_REPO/commits/$IDF_BRANCH/#:~:text=$IDF_Commit_short)
147+
echo "Framework built from
148+
- $IDF_REPO branch [$IDF_BRANCH](https://github.com/$IDF_REPO/tree/$IDF_BRANCH) commit [$IDF_Commit_short](https://github.com/$IDF_REPO/commits/$IDF_BRANCH/#:~:text=$IDF_Commit_short)
149149
- $AR_REPO branch [$AR_BRANCH](https://github.com/$AR_REPO/tree/$AR_BRANCH) commit [$AR_Commit_short](https://github.com/$AR_REPO/commits/$AR_BRANCH/#:~:text=$AR_Commit_short)
150150
- Arduino lib builder branch: $GIT_BRANCH" >> release-info.txt
151151

@@ -235,19 +235,38 @@ for component in `ls "$AR_MANAGED_COMPS"`; do
235235
fi
236236
done
237237

238+
export IDF_COMMIT=$(git -C "$IDF_PATH" rev-parse --short HEAD)
239+
238240
# update package_esp32_index.template.json
239241
if [ "$BUILD_TYPE" = "all" ]; then
240242
python3 ./tools/gen_tools_json.py -i "$IDF_PATH" -j "$AR_COMPS/arduino/package/package_esp32_index.template.json" -o "$AR_OUT/"
241243
python3 ./tools/gen_tools_json.py -i "$IDF_PATH" -o "$TOOLS_JSON_OUT/"
242244
if [ $? -ne 0 ]; then exit 1; fi
243245
fi
244246

245-
# Generate PlatformIO manifest file
247+
# Generate PlatformIO library manifest file
246248
if [ "$BUILD_TYPE" = "all" ]; then
247-
python3 ./tools/gen_platformio_manifest.py -o "$TOOLS_JSON_OUT/" -s $(git -C "$IDF_PATH" symbolic-ref --short HEAD || git -C "$IDF_PATH" tag --points-at HEAD) -c $(git -C "$IDF_PATH" rev-parse --short HEAD)
249+
python3 ./tools/gen_pio_lib_manifest.py -o "$TOOLS_JSON_OUT/" -s "$IDF_BRANCH" -c "$IDF_COMMIT"
248250
if [ $? -ne 0 ]; then exit 1; fi
249251
fi
250252

253+
AR_VERSION=$(jq -c '.version' "$AR_COMPS/arduino/package.json" | tr -d '"')
254+
AR_VERSION_UNDERSCORE=`echo "$AR_VERSION" | tr . _`
255+
256+
# Generate PlatformIO framework manifest file
257+
rm -rf "$AR_ROOT/package.json"
258+
if [ "$BUILD_TYPE" = "all" ]; then
259+
python3 ./tools/gen_pio_frmwk_manifest.py -o "$AR_ROOT/" -s "v$AR_VERSION" -c "$IDF_COMMIT"
260+
if [ $? -ne 0 ]; then exit 1; fi
261+
fi
262+
263+
# Generate core_version.h
264+
rm -rf "$AR_ROOT/core_version.h"
265+
echo "#define ARDUINO_ESP32_GIT_VER 0x$AR_Commit_short
266+
#define ARDUINO_ESP32_GIT_DESC $AR_VERSION
267+
#define ARDUINO_ESP32_RELEASE_$AR_VERSION_UNDERSCORE
268+
#define ARDUINO_ESP32_RELEASE \"$AR_VERSION_UNDERSCORE\"" >> "$AR_ROOT/core_version.h"
269+
251270
# copy everything to arduino-esp32 installation
252271
if [ $COPY_OUT -eq 1 ] && [ -d "$ESP32_ARDUINO" ]; then
253272
./tools/copy-to-arduino.sh

0 commit comments

Comments
 (0)