Update scripts
This commit is contained in:
parent
7fda93ee7a
commit
296fda565d
8 changed files with 12 additions and 25 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -7,6 +7,8 @@ components/esp32-camera/
|
|||
components/esp_littlefs/
|
||||
components/esp-rainmaker/
|
||||
components/esp-dsp/
|
||||
components/esp-insights/
|
||||
components/arduino_tinyusb/tinyusb/
|
||||
esp-idf/
|
||||
out/
|
||||
build/
|
||||
|
|
@ -15,7 +17,4 @@ env.sh
|
|||
sdkconfig
|
||||
sdkconfig.old
|
||||
version.txt
|
||||
components/arduino_tinyusb/tinyusb/
|
||||
dependencies.lock
|
||||
tools/esptool/
|
||||
components/esp-insights/
|
||||
|
|
|
|||
6
build.sh
6
build.sh
|
|
@ -124,15 +124,15 @@ rm -rf build sdkconfig out
|
|||
|
||||
# Add components version info
|
||||
mkdir -p "$AR_TOOLS/sdk" && rm -rf version.txt && rm -rf "$AR_TOOLS/sdk/versions.txt"
|
||||
component_version="esp-idf: "$(git -C "$IDF_PATH" symbolic-ref --short HEAD)" "$(git -C "$IDF_PATH" rev-parse --short HEAD)
|
||||
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)
|
||||
echo $component_version >> version.txt && echo $component_version >> "$AR_TOOLS/sdk/versions.txt"
|
||||
for component in `ls "$AR_COMPS"`; do
|
||||
if [ -d "$AR_COMPS/$component/.git" ] || [ -d "$AR_COMPS/$component/.github" ]; then
|
||||
component_version="$component: "$(git -C "$AR_COMPS/$component" symbolic-ref --short HEAD)" "$(git -C "$AR_COMPS/$component" rev-parse --short HEAD)
|
||||
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)
|
||||
echo $component_version >> version.txt && echo $component_version >> "$AR_TOOLS/sdk/versions.txt"
|
||||
fi
|
||||
done
|
||||
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)
|
||||
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)
|
||||
echo $component_version >> version.txt && echo $component_version >> "$AR_TOOLS/sdk/versions.txt"
|
||||
|
||||
#targets_count=`jq -c '.targets[] | length' configs/builds.json`
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
IDF_COMMIT=$(git -C "$IDF_PATH" rev-parse --short HEAD || echo "")
|
||||
IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD || echo "")
|
||||
IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD || git -C "$IDF_PATH" tag --points-at HEAD || echo "")
|
||||
|
||||
idf_version_string=${IDF_BRANCH//\//_}"-$IDF_COMMIT"
|
||||
archive_path="dist/arduino-esp32-libs-$idf_version_string.tar.gz"
|
||||
|
|
|
|||
|
|
@ -104,14 +104,15 @@ function git_create_pr(){ # git_create_pr <branch> <title>
|
|||
local pr_title="$2"
|
||||
local pr_target="$3"
|
||||
local pr_body=""
|
||||
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"
|
||||
for component in `ls "$AR_COMPS"`; do
|
||||
if [ ! $component == "arduino" ]; then
|
||||
if [ -d "$AR_COMPS/$component/.git" ] || [ -d "$AR_COMPS/$component/.github" ]; then
|
||||
pr_body+="$component: "$(git -C "$AR_COMPS/$component" symbolic-ref --short HEAD)" "$(git -C "$AR_COMPS/$component" rev-parse --short HEAD)"\r\n"
|
||||
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"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
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"
|
||||
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"
|
||||
local pr_data="{\"title\": \"$pr_title\", \"body\": \"$pr_body\", \"head\": \"$AR_USER:$pr_branch\", \"base\": \"$pr_target\"}"
|
||||
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"`
|
||||
local done_pr=`echo "$git_create_pr_res" | jq -r '.title'`
|
||||
|
|
|
|||
|
|
@ -7,15 +7,8 @@ BOOTCONF=$FLASH_MODE"_$FLASH_FREQ"
|
|||
|
||||
source ./tools/config.sh
|
||||
|
||||
echo "Copying bootloader: $AR_SDK/bin/bootloader_$BOOTCONF.bin"
|
||||
echo "Copying bootloader: $AR_SDK/bin/bootloader_$BOOTCONF.elf"
|
||||
|
||||
mkdir -p "$AR_SDK/bin"
|
||||
|
||||
# Workaround for getting the bootloaders to be flashable with esptool v4.x
|
||||
# It might still be needed for IDF5, but using the included esptool instead
|
||||
#cp "build/bootloader/bootloader.bin" "$AR_SDK/bin/bootloader_$BOOTCONF.bin"
|
||||
if [ ! -e "tools/esptool" ]; then
|
||||
git clone https://github.com/espressif/esptool tools/esptool
|
||||
fi
|
||||
./tools/esptool/esptool.py --chip "$IDF_TARGET" elf2image --dont-append-digest "build/bootloader/bootloader.elf" -o "$AR_SDK/bin/bootloader_$BOOTCONF.bin"
|
||||
cp "build/bootloader/bootloader.elf" "$AR_SDK/bin/bootloader_$BOOTCONF.elf"
|
||||
|
|
|
|||
|
|
@ -16,10 +16,9 @@ fi
|
|||
|
||||
echo "Installing new libraries to $ESP32_ARDUINO"
|
||||
|
||||
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
|
||||
rm -rf $ESP32_ARDUINO/tools/sdk $ESP32_ARDUINO/tools/gen_esp32part.py $ESP32_ARDUINO/tools/platformio-build-*.py $ESP32_ARDUINO/platform.txt
|
||||
|
||||
cp -f $AR_OUT/platform.txt $ESP32_ARDUINO/
|
||||
cp -Rf $AR_TOOLS/sdk $ESP32_ARDUINO/tools/
|
||||
cp -f $AR_TOOLS/esptool.py $ESP32_ARDUINO/tools/
|
||||
cp -f $AR_TOOLS/gen_esp32part.py $ESP32_ARDUINO/tools/
|
||||
cp -f $AR_TOOLS/platformio-build-*.py $ESP32_ARDUINO/tools/
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ fi
|
|||
|
||||
source $IDF_PATH/export.sh
|
||||
export IDF_COMMIT=$(git -C "$IDF_PATH" rev-parse --short HEAD)
|
||||
export IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD)
|
||||
export IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD || git -C "$IDF_PATH" tag --points-at HEAD)
|
||||
|
||||
#
|
||||
# SETUP ARDUINO DEPLOY
|
||||
|
|
|
|||
|
|
@ -114,7 +114,6 @@ if [ $? -ne 0 ]; then exit 1; fi
|
|||
if [ ! -d "$AR_COMPS/esp-rainmaker" ]; then
|
||||
git clone $RMAKER_REPO_URL "$AR_COMPS/esp-rainmaker" && \
|
||||
git -C "$AR_COMPS/esp-rainmaker" submodule update --init --recursive
|
||||
# git -C "$AR_COMPS/esp-rainmaker" checkout f1b82c71c4536ab816d17df016d8afe106bd60e3
|
||||
else
|
||||
git -C "$AR_COMPS/esp-rainmaker" fetch && \
|
||||
git -C "$AR_COMPS/esp-rainmaker" pull --ff-only && \
|
||||
|
|
@ -142,10 +141,6 @@ if [ $? -ne 0 ]; then exit 1; fi
|
|||
|
||||
if [ ! -d "$AR_COMPS/esp-dsp" ]; then
|
||||
git clone $DSP_REPO_URL "$AR_COMPS/esp-dsp"
|
||||
# cml=`cat "$AR_COMPS/esp-dsp/CMakeLists.txt"`
|
||||
# echo "if(IDF_TARGET STREQUAL \"esp32\" OR IDF_TARGET STREQUAL \"esp32s2\" OR IDF_TARGET STREQUAL \"esp32s3\")" > "$AR_COMPS/esp-dsp/CMakeLists.txt"
|
||||
# echo "$cml" >> "$AR_COMPS/esp-dsp/CMakeLists.txt"
|
||||
# echo "endif()" >> "$AR_COMPS/esp-dsp/CMakeLists.txt"
|
||||
else
|
||||
git -C "$AR_COMPS/esp-dsp" fetch && \
|
||||
git -C "$AR_COMPS/esp-dsp" pull --ff-only
|
||||
|
|
|
|||
Loading…
Reference in a new issue