Skip to content

Commit 846dc29

Browse files
committed
Archive only the result and reorder deploy commands
1 parent dbf19e2 commit 846dc29

File tree

4 files changed

+23
-15
lines changed

4 files changed

+23
-15
lines changed

build.sh

+11-7
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ TARGET="all"
1414
BUILD_TYPE="all"
1515
SKIP_ENV=0
1616
COPY_OUT=0
17-
DEPLOY_OUT=0
17+
if [ -z $DEPLOY_OUT ]; then
18+
DEPLOY_OUT=0
19+
fi
1820

1921
function print_help() {
2022
echo "Usage: build.sh [-s] [-A <arduino_branch>] [-I <idf_branch>] [-i <idf_commit>] [-c <path>] [-t <target>] [-b <build|menuconfig|reconfigure|idf_libs|copy_bootloader|mem_variant>] [config ...]"
@@ -195,17 +197,19 @@ if [ "$BUILD_TYPE" = "all" ]; then
195197
if [ $? -ne 0 ]; then exit 1; fi
196198
fi
197199

198-
# archive the build
199-
if [ "$BUILD_TYPE" = "all" ]; then
200-
./tools/archive-build.sh
201-
if [ $? -ne 0 ]; then exit 1; fi
202-
fi
203-
204200
# copy everything to arduino-esp32 installation
205201
if [ $COPY_OUT -eq 1 ] && [ -d "$ESP32_ARDUINO" ]; then
206202
./tools/copy-to-arduino.sh
203+
if [ $? -ne 0 ]; then exit 1; fi
207204
fi
208205

209206
if [ $DEPLOY_OUT -eq 1 ]; then
210207
./tools/push-to-arduino.sh
208+
if [ $? -ne 0 ]; then exit 1; fi
209+
fi
210+
211+
# archive the build
212+
if [ "$BUILD_TYPE" = "all" ]; then
213+
./tools/archive-build.sh
214+
if [ $? -ne 0 ]; then exit 1; fi
211215
fi

tools/archive-build.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD || git -C "$IDF_PATH"
55

66
idf_version_string=${IDF_BRANCH//\//_}"-$IDF_COMMIT"
77
archive_path="dist/arduino-esp32-libs-$idf_version_string.tar.gz"
8-
build_archive_path="dist/arduino-esp32-build-$idf_version_string.tar.gz"
8+
# build_archive_path="dist/arduino-esp32-build-$idf_version_string.tar.gz"
99

1010
mkdir -p dist && rm -rf "$archive_path" "$build_archive_path"
1111
if [ -d "out" ]; then
1212
cd out && tar zcf "../$archive_path" * && cd ..
1313
fi
14-
if [ -d "build" ]; then
15-
cd build && tar zcf "../$build_archive_path" * && cd ..
16-
fi
14+
# if [ -d "build" ]; then
15+
# cd build && tar zcf "../$build_archive_path" * && cd ..
16+
# fi

tools/install-esp-idf.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ if [ "$GITHUB_EVENT_NAME" == "schedule" ] || [ "$GITHUB_EVENT_NAME" == "reposito
5858
AR_NEW_COMMIT_MESSAGE="IDF $IDF_COMMIT"
5959
AR_NEW_PR_TITLE="$AR_NEW_COMMIT_MESSAGE"
6060
fi
61-
LIBS_VERSION="idf-$IDF_BRANCH-$IDF_COMMIT"
61+
LIBS_VERSION="idf-"${IDF_BRANCH//\//_}"-$IDF_COMMIT"
6262

6363
AR_HAS_COMMIT=`git_commit_exists "$AR_COMPS/arduino" "$AR_NEW_COMMIT_MESSAGE"`
6464
AR_HAS_BRANCH=`git_branch_exists "$AR_COMPS/arduino" "$AR_NEW_BRANCH_NAME"`

tools/repository_dispatch.sh

+7-3
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,12 @@ if [ ! "$arduino" == "" ] && [ ! "$arduino" == "null" ]; then
4242
export AR_BRANCH="$arduino"
4343
fi
4444

45-
source ./build.sh
46-
4745
if [ "$action" == "deploy" ]; then
48-
bash ./tools/push-to-arduino.sh
46+
DEPLOY_OUT=1
4947
fi
48+
49+
source ./build.sh
50+
51+
# if [ "$action" == "deploy" ]; then
52+
# bash ./tools/push-to-arduino.sh
53+
# fi

0 commit comments

Comments
 (0)