Skip to content

Commit edc6b6d

Browse files
authored
Update build.sh
1 parent 3e05c4a commit edc6b6d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

build.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,22 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do
176176
done
177177
done
178178

179+
# Add release-info
180+
rm -rf release-info.txt
181+
IDF_Commit_short=$(git -C "$IDF_PATH" rev-parse --short HEAD || echo "")
182+
AR_Commit_short=$(git -C "$AR_COMPS/arduino" rev-parse --short HEAD || echo "")
183+
echo "Framework built from
184+
- $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)
185+
- $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)
186+
- Arduino lib builder branch: $GIT_BRANCH" >> release-info.txt
187+
188+
# Generate core_version.h
189+
rm -rf "$AR_ROOT/core_version.h"
190+
echo "#define ARDUINO_ESP32_GIT_VER 0x$AR_Commit_short
191+
#define ARDUINO_ESP32_GIT_DESC $AR_VERSION
192+
#define ARDUINO_ESP32_RELEASE_$AR_VERSION_UNDERSCORE
193+
#define ARDUINO_ESP32_RELEASE \"$AR_VERSION_UNDERSCORE\"" >> "$AR_ROOT/core_version.h"
194+
179195
# update package_esp32_index.template.json
180196
if [ "$BUILD_TYPE" = "all" ]; then
181197
python3 ./tools/gen_tools_json.py -i "$IDF_PATH" -j "$AR_COMPS/arduino/package/package_esp32_index.template.json" -o "$AR_OUT/"

0 commit comments

Comments
 (0)