]> granicus.if.org Git - esp-idf/commitdiff
ci: Allow bot to control branch used for esp-idf-template
authorAngus Gratton <angus@espressif.com>
Tue, 8 May 2018 06:42:54 +0000 (14:42 +0800)
committerAngus Gratton <gus@projectgus.com>
Tue, 8 May 2018 06:44:25 +0000 (14:44 +0800)
tools/ci/test_build_system.sh
tools/ci/test_build_system_cmake.sh

index e5ae4ea9f30bbce14e8e5d2fc660b89d9e2754fe..efc3703b180b95fee925da3e213dc336b4d5ccba 100755 (executable)
@@ -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 $?
index 6f245f6b60dcb98406d54bfac55a563cf5ea49b9..8484255a041a01368c48ac171623aeb5c5dd3729 100755 (executable)
@@ -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 $?