Skip to content

Support specifying a tag for Arduino #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ if [ -z $DEPLOY_OUT ]; then
fi

function print_help() {
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 ...]"
echo "Usage: build.sh [-s] [-A <arduino_branch>] [-a <arduino_tag>] [-I <idf_branch>] [-i <idf_commit>] [-c <path>] [-t <target>] [-b <build|menuconfig|reconfigure|idf_libs|copy_bootloader|mem_variant>] [config ...]"
echo " -s Skip installing/updating of ESP-IDF and all components"
echo " -A Set which branch of arduino-esp32 to be used for compilation"
echo " -a Set which tag of arduino-esp32 to be used for compilation"
echo " -I Set which branch of ESP-IDF to be used for compilation"
echo " -i Set which commit of ESP-IDF to be used for compilation"
echo " -d Deploy the build to github arduino-esp32"
Expand All @@ -32,7 +33,7 @@ function print_help() {
exit 1
}

while getopts ":A:I:i:c:t:b:sd" opt; do
while getopts ":A:a:I:i:c:t:b:sd" opt; do
case ${opt} in
s )
SKIP_ENV=1
Expand All @@ -47,6 +48,9 @@ while getopts ":A:I:i:c:t:b:sd" opt; do
A )
export AR_BRANCH="$OPTARG"
;;
a )
export AR_TAG="$OPTARG"
;;
I )
export IDF_BRANCH="$OPTARG"
;;
Expand Down
10 changes: 9 additions & 1 deletion tools/update-components.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if [ ! -d "$AR_COMPS/arduino" ]; then
git clone $AR_REPO_URL "$AR_COMPS/arduino"
fi

if [ -z $AR_BRANCH ]; then
if [ -z $AR_BRANCH ] && [ -z $AR_TAG ]; then
if [ -z $GITHUB_HEAD_REF ]; then
current_branch=`git branch --show-current`
else
Expand Down Expand Up @@ -54,6 +54,14 @@ if [ "$AR_BRANCH" ]; then
fi
if [ $? -ne 0 ]; then exit 1; fi

if [ "$AR_TAG" ]; then
if [ "$AR_BRANCH" ]; then
echo "Warning: Both branch and tag specifiied for arduino-esp32. Tag takes precedence. Ignoring branch."
fi
git -C "$AR_COMPS/arduino" checkout "tags/$AR_TAG"
fi
if [ $? -ne 0 ]; then exit 1; fi

#
# CLONE/UPDATE ESP32-ARDUINO-LIBS
#
Expand Down