Skip to content

Commit 296fda5

Browse files
committed
Update scripts
1 parent 7fda93e commit 296fda5

File tree

8 files changed

+12
-25
lines changed

8 files changed

+12
-25
lines changed

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ components/esp32-camera/
77
components/esp_littlefs/
88
components/esp-rainmaker/
99
components/esp-dsp/
10+
components/esp-insights/
11+
components/arduino_tinyusb/tinyusb/
1012
esp-idf/
1113
out/
1214
build/
@@ -15,7 +17,4 @@ env.sh
1517
sdkconfig
1618
sdkconfig.old
1719
version.txt
18-
components/arduino_tinyusb/tinyusb/
1920
dependencies.lock
20-
tools/esptool/
21-
components/esp-insights/

build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,15 @@ rm -rf build sdkconfig out
124124

125125
# Add components version info
126126
mkdir -p "$AR_TOOLS/sdk" && rm -rf version.txt && rm -rf "$AR_TOOLS/sdk/versions.txt"
127-
component_version="esp-idf: "$(git -C "$IDF_PATH" symbolic-ref --short HEAD)" "$(git -C "$IDF_PATH" rev-parse --short HEAD)
127+
component_version="esp-idf: "$(git -C "$IDF_PATH" symbolic-ref --short HEAD || git -C "$IDF_PATH" tag --points-at HEAD)" "$(git -C "$IDF_PATH" rev-parse --short HEAD)
128128
echo $component_version >> version.txt && echo $component_version >> "$AR_TOOLS/sdk/versions.txt"
129129
for component in `ls "$AR_COMPS"`; do
130130
if [ -d "$AR_COMPS/$component/.git" ] || [ -d "$AR_COMPS/$component/.github" ]; then
131-
component_version="$component: "$(git -C "$AR_COMPS/$component" symbolic-ref --short HEAD)" "$(git -C "$AR_COMPS/$component" rev-parse --short HEAD)
131+
component_version="$component: "$(git -C "$AR_COMPS/$component" symbolic-ref --short HEAD || git -C "$AR_COMPS/$component" tag --points-at HEAD)" "$(git -C "$AR_COMPS/$component" rev-parse --short HEAD)
132132
echo $component_version >> version.txt && echo $component_version >> "$AR_TOOLS/sdk/versions.txt"
133133
fi
134134
done
135-
component_version="tinyusb: "$(git -C "$AR_COMPS/arduino_tinyusb/tinyusb" symbolic-ref --short HEAD)" "$(git -C "$AR_COMPS/arduino_tinyusb/tinyusb" rev-parse --short HEAD)
135+
component_version="tinyusb: "$(git -C "$AR_COMPS/arduino_tinyusb/tinyusb" symbolic-ref --short HEAD || git -C "$AR_COMPS/arduino_tinyusb/tinyusb" tag --points-at HEAD)" "$(git -C "$AR_COMPS/arduino_tinyusb/tinyusb" rev-parse --short HEAD)
136136
echo $component_version >> version.txt && echo $component_version >> "$AR_TOOLS/sdk/versions.txt"
137137

138138
#targets_count=`jq -c '.targets[] | length' configs/builds.json`

tools/archive-build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
IDF_COMMIT=$(git -C "$IDF_PATH" rev-parse --short HEAD || echo "")
4-
IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD || echo "")
4+
IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD || git -C "$IDF_PATH" tag --points-at HEAD || echo "")
55

66
idf_version_string=${IDF_BRANCH//\//_}"-$IDF_COMMIT"
77
archive_path="dist/arduino-esp32-libs-$idf_version_string.tar.gz"

tools/config.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,15 @@ function git_create_pr(){ # git_create_pr <branch> <title>
104104
local pr_title="$2"
105105
local pr_target="$3"
106106
local pr_body=""
107+
pr_body+="esp-idf: "$(git -C "$IDF_PATH" symbolic-ref --short HEAD || git -C "$IDF_PATH" tag --points-at HEAD)" "$(git -C "$IDF_PATH" rev-parse --short HEAD)"\r\n"
107108
for component in `ls "$AR_COMPS"`; do
108109
if [ ! $component == "arduino" ]; then
109110
if [ -d "$AR_COMPS/$component/.git" ] || [ -d "$AR_COMPS/$component/.github" ]; then
110-
pr_body+="$component: "$(git -C "$AR_COMPS/$component" symbolic-ref --short HEAD)" "$(git -C "$AR_COMPS/$component" rev-parse --short HEAD)"\r\n"
111+
pr_body+="$component: "$(git -C "$AR_COMPS/$component" symbolic-ref --short HEAD || git -C "$AR_COMPS/$component" tag --points-at HEAD)" "$(git -C "$AR_COMPS/$component" rev-parse --short HEAD)"\r\n"
111112
fi
112113
fi
113114
done
114-
pr_body+="tinyusb: "$(git -C "$AR_COMPS/arduino_tinyusb/tinyusb" symbolic-ref --short HEAD)" "$(git -C "$AR_COMPS/arduino_tinyusb/tinyusb" rev-parse --short HEAD)"\r\n"
115+
pr_body+="tinyusb: "$(git -C "$AR_COMPS/arduino_tinyusb/tinyusb" symbolic-ref --short HEAD || git -C "$AR_COMPS/arduino_tinyusb/tinyusb" tag --points-at HEAD)" "$(git -C "$AR_COMPS/arduino_tinyusb/tinyusb" rev-parse --short HEAD)"\r\n"
115116
local pr_data="{\"title\": \"$pr_title\", \"body\": \"$pr_body\", \"head\": \"$AR_USER:$pr_branch\", \"base\": \"$pr_target\"}"
116117
git_create_pr_res=`echo "$pr_data" | curl -k -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3.raw+json" --data @- "https://api.github.com/repos/$AR_REPO/pulls"`
117118
local done_pr=`echo "$git_create_pr_res" | jq -r '.title'`

tools/copy-bootloader.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,8 @@ BOOTCONF=$FLASH_MODE"_$FLASH_FREQ"
77

88
source ./tools/config.sh
99

10-
echo "Copying bootloader: $AR_SDK/bin/bootloader_$BOOTCONF.bin"
10+
echo "Copying bootloader: $AR_SDK/bin/bootloader_$BOOTCONF.elf"
1111

1212
mkdir -p "$AR_SDK/bin"
1313

14-
# Workaround for getting the bootloaders to be flashable with esptool v4.x
15-
# It might still be needed for IDF5, but using the included esptool instead
16-
#cp "build/bootloader/bootloader.bin" "$AR_SDK/bin/bootloader_$BOOTCONF.bin"
17-
if [ ! -e "tools/esptool" ]; then
18-
git clone https://github.com/espressif/esptool tools/esptool
19-
fi
20-
./tools/esptool/esptool.py --chip "$IDF_TARGET" elf2image --dont-append-digest "build/bootloader/bootloader.elf" -o "$AR_SDK/bin/bootloader_$BOOTCONF.bin"
2114
cp "build/bootloader/bootloader.elf" "$AR_SDK/bin/bootloader_$BOOTCONF.elf"

tools/copy-to-arduino.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ fi
1616

1717
echo "Installing new libraries to $ESP32_ARDUINO"
1818

19-
rm -rf $ESP32_ARDUINO/tools/sdk $ESP32_ARDUINO/tools/esptool.py $ESP32_ARDUINO/tools/gen_esp32part.py $ESP32_ARDUINO/tools/platformio-build-*.py $ESP32_ARDUINO/platform.txt
19+
rm -rf $ESP32_ARDUINO/tools/sdk $ESP32_ARDUINO/tools/gen_esp32part.py $ESP32_ARDUINO/tools/platformio-build-*.py $ESP32_ARDUINO/platform.txt
2020

2121
cp -f $AR_OUT/platform.txt $ESP32_ARDUINO/
2222
cp -Rf $AR_TOOLS/sdk $ESP32_ARDUINO/tools/
23-
cp -f $AR_TOOLS/esptool.py $ESP32_ARDUINO/tools/
2423
cp -f $AR_TOOLS/gen_esp32part.py $ESP32_ARDUINO/tools/
2524
cp -f $AR_TOOLS/platformio-build-*.py $ESP32_ARDUINO/tools/

tools/install-esp-idf.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fi
3838

3939
source $IDF_PATH/export.sh
4040
export IDF_COMMIT=$(git -C "$IDF_PATH" rev-parse --short HEAD)
41-
export IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD)
41+
export IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD || git -C "$IDF_PATH" tag --points-at HEAD)
4242

4343
#
4444
# SETUP ARDUINO DEPLOY

tools/update-components.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ if [ $? -ne 0 ]; then exit 1; fi
114114
if [ ! -d "$AR_COMPS/esp-rainmaker" ]; then
115115
git clone $RMAKER_REPO_URL "$AR_COMPS/esp-rainmaker" && \
116116
git -C "$AR_COMPS/esp-rainmaker" submodule update --init --recursive
117-
# git -C "$AR_COMPS/esp-rainmaker" checkout f1b82c71c4536ab816d17df016d8afe106bd60e3
118117
else
119118
git -C "$AR_COMPS/esp-rainmaker" fetch && \
120119
git -C "$AR_COMPS/esp-rainmaker" pull --ff-only && \
@@ -142,10 +141,6 @@ if [ $? -ne 0 ]; then exit 1; fi
142141

143142
if [ ! -d "$AR_COMPS/esp-dsp" ]; then
144143
git clone $DSP_REPO_URL "$AR_COMPS/esp-dsp"
145-
# cml=`cat "$AR_COMPS/esp-dsp/CMakeLists.txt"`
146-
# echo "if(IDF_TARGET STREQUAL \"esp32\" OR IDF_TARGET STREQUAL \"esp32s2\" OR IDF_TARGET STREQUAL \"esp32s3\")" > "$AR_COMPS/esp-dsp/CMakeLists.txt"
147-
# echo "$cml" >> "$AR_COMPS/esp-dsp/CMakeLists.txt"
148-
# echo "endif()" >> "$AR_COMPS/esp-dsp/CMakeLists.txt"
149144
else
150145
git -C "$AR_COMPS/esp-dsp" fetch && \
151146
git -C "$AR_COMPS/esp-dsp" pull --ff-only

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy