From: Angus Gratton Date: Tue, 8 May 2018 06:42:54 +0000 (+0800) Subject: ci: Allow bot to control branch used for esp-idf-template X-Git-Tag: v3.1-rc2~9^2~21^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=526496ba207b675367b1f8058c2e81c9cea17294;p=esp-idf ci: Allow bot to control branch used for esp-idf-template --- diff --git a/tools/ci/test_build_system.sh b/tools/ci/test_build_system.sh index e5ae4ea9f3..efc3703b18 100755 --- a/tools/ci/test_build_system.sh +++ b/tools/ci/test_build_system.sh @@ -43,7 +43,11 @@ function run_tests() print_status "Cloning template from ${ESP_IDF_TEMPLATE_GIT}..." git clone ${ESP_IDF_TEMPLATE_GIT} template cd template - git checkout ${CI_BUILD_REF_NAME} || echo "Using esp-idf-template default branch..." + if [ -z $CHECKOUT_REF_SCRIPT ]; then + git checkout ${CI_BUILD_REF_NAME} || echo "Using esp-idf-template default branch..." + else + $CHECKOUT_REF_SCRIPT esp-idf-template + fi print_status "Updating template config..." make defconfig || exit $? diff --git a/tools/ci/test_build_system_cmake.sh b/tools/ci/test_build_system_cmake.sh index 6f245f6b60..8484255a04 100755 --- a/tools/ci/test_build_system_cmake.sh +++ b/tools/ci/test_build_system_cmake.sh @@ -45,7 +45,11 @@ function run_tests() print_status "Cloning template from ${ESP_IDF_TEMPLATE_GIT}..." git clone ${ESP_IDF_TEMPLATE_GIT} template cd template - git checkout ${CI_BUILD_REF_NAME} || echo "Using esp-idf-template default branch..." + if [ -z $CHECKOUT_REF_SCRIPT ]; then + git checkout ${CI_BUILD_REF_NAME} || echo "Using esp-idf-template default branch..." + else + $CHECKOUT_REF_SCRIPT esp-idf-template + fi print_status "Try to clean fresh directory..." idf.py fullclean || exit $?