Skip to content

Commit b17252f

Browse files
committed
fix manifest script build error
1 parent 7c466b9 commit b17252f

File tree

5 files changed

+17
-16
lines changed

5 files changed

+17
-16
lines changed

Diff for: build.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -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

@@ -245,10 +245,10 @@ fi
245245
# Generate PlatformIO manifest file
246246
if [ "$BUILD_TYPE" = "all" ]; then
247247
pushd $IDF_PATH
248-
ibr=$(git branch --show-current)
248+
ibr=$(git describe --all --exact-match 2>/dev/null)
249249
ic=$(git -C "$IDF_PATH" rev-parse --short HEAD)
250250
popd
251-
python3 ./tools/gen_platformio_manifest.py -o "$TOOLS_JSON_OUT/" -s "$ibr" -c "$ic"
251+
python3 ./tools/gen_platformio_manifest.py -o "$TOOLS_JSON_OUT/" -s "$IDF_BRANCH" -c "$IDF_COMMIT"
252252
if [ $? -ne 0 ]; then exit 1; fi
253253
fi
254254

Diff for: tools/archive-build.sh

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/bash
22

3-
IDF_COMMIT=$(git -C "$IDF_PATH" rev-parse --short HEAD || echo "")
4-
IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD || git -C "$IDF_PATH" tag --points-at HEAD || echo "")
53
idf_version_string=${IDF_BRANCH//\//_}"-$IDF_COMMIT"
64

75
archive_path="dist/arduino-esp32-libs-$idf_version_string.tar.gz"

Diff for: tools/config.sh

+12-7
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if [ -z $IDF_PATH ]; then
66
fi
77

88
if [ -z $IDF_BRANCH ]; then
9-
IDF_BRANCH="release/v5.1"
9+
export IDF_BRANCH="release/v5.1"
1010
fi
1111

1212
# Arduino branch to use
@@ -60,17 +60,20 @@ TOOLS_JSON_OUT="$AR_TOOLS/esp32-arduino-libs"
6060
IDF_LIBS_DIR="$AR_ROOT/../esp32-arduino-libs"
6161

6262
if [ "$IDF_COMMIT" ]; then
63-
echo "Using IDF commit $IDF_COMMIT"
6463
export IDF_COMMIT
65-
elif [ -d "$IDF_PATH" ]; then
66-
export IDF_COMMIT=$(git -C "$IDF_PATH" rev-parse --short HEAD)
67-
export IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD || git -C "$IDF_PATH" tag --points-at HEAD)
6864
fi
6965

66+
if [ -d "$IDF_PATH" ]; then
67+
export IDF_COMMIT=$(git -C "$IDF_PATH" rev-parse --short HEAD)
68+
fi
69+
70+
echo "Using IDF branch $IDF_BRANCH"
71+
echo "Using IDF commit $IDF_COMMIT"
72+
7073
if [ "$AR_COMMIT" ]; then
71-
echo "Using commit $AR_COMMIT for Arduino"
74+
echo "Using Arduino commit $AR_COMMIT"
7275
else
73-
AR_COMMIT=$(git -C "$AR_COMPS/arduino" rev-parse --short HEAD || echo "")
76+
export AR_COMMIT=$(git -C "$AR_COMPS/arduino" rev-parse --short HEAD || echo "")
7477
fi
7578

7679
#rm -rf release-info.txt
@@ -103,6 +106,7 @@ function get_os(){
103106
AR_OS=`get_os`
104107

105108
export SED="sed"
109+
export AWK="awk"
106110
export SSTAT="stat -c %s"
107111

108112
if [[ "$AR_OS" == "macos" ]]; then
@@ -115,6 +119,7 @@ if [[ "$AR_OS" == "macos" ]]; then
115119
exit 1
116120
fi
117121
export SED="gsed"
122+
export AWK="gawk"
118123
export SSTAT="stat -f %z"
119124
fi
120125

Diff for: tools/gen_tools_json.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
if tool_name.endswith('-elf'):
6060
tool_name += '-gcc'
6161
print('Found {0}, version: {1}'.format(tool_name, tool_version))
62-
62+
6363
if simple_output == False:
6464
dep_found = False
6565
dep_skip = False

Diff for: tools/install-esp-idf.sh

-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ fi
6363
if [ ! -x $idf_was_installed ] || [ ! -x $commit_predefined ]; then
6464
git submodule update --recursive
6565
$IDF_PATH/install.sh
66-
export IDF_COMMIT=$(git -C "$IDF_PATH" rev-parse --short HEAD)
67-
export IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD || git -C "$IDF_PATH" tag --points-at HEAD)
6866

6967
# Temporarily patch the ESP32-S2 I2C LL driver to keep the clock source
7068
cd $IDF_PATH

0 commit comments

Comments
 (0)