]> granicus.if.org Git - esp-idf/commitdiff
scripts: Fix shell exit. Really exit from current process, not from child process
authorAnton Maklakov <anton@espressif.com>
Wed, 5 Dec 2018 13:00:36 +0000 (21:00 +0800)
committerAnton Maklakov <anton@espressif.com>
Wed, 5 Dec 2018 13:25:16 +0000 (21:25 +0800)
.gitlab-ci.yml
make/project.mk
tools/ci/test_configure_ci_environment.sh

index 401d4575bbf66dabe3cd7c18bc7af1f45e9f979e..81d5280beda8da7d7e15d6a0cc274ea8462c5a2a 100644 (file)
@@ -583,9 +583,9 @@ test_esp_err_to_name_on_host:
   script:
     - cd ${IDF_PATH}/tools/
     - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh -p 2.7.15 ./gen_esp_err_to_name.py
-    - git diff --exit-code -- ../components/esp32/esp_err_to_name.c || (echo 'Differences found. Please run gen_esp_err_to_name.py and commit the changes.'; exit 1)
+    - git diff --exit-code -- ../components/esp32/esp_err_to_name.c || { echo 'Differences found. Please run gen_esp_err_to_name.py and commit the changes.'; exit 1; }
     - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh -p 3.4.8 ./gen_esp_err_to_name.py
-    - git diff --exit-code -- ../components/esp32/esp_err_to_name.c || (echo 'Differences found between running under Python 2 and 3.'; exit 1)
+    - git diff --exit-code -- ../components/esp32/esp_err_to_name.c || { echo 'Differences found between running under Python 2 and 3.'; exit 1; }
 
 test_espcoredump:
   <<: *host_test_template
index 31e2e353c46a02c51f33ea8eb02b1faf30e6030c..cbd93b346c074da37451a902127d489d50b85874 100644 (file)
@@ -570,8 +570,8 @@ define GenerateSubmoduleCheckTarget
 check-submodules: $(IDF_PATH)/$(1)/.git
 $(IDF_PATH)/$(1)/.git:
        @echo "WARNING: Missing submodule $(1)..."
-       [ -e ${IDF_PATH}/.git ] || ( echo "ERROR: esp-idf must be cloned from git to work."; exit 1)
-       [ -x "$(shell which git)" ] || ( echo "ERROR: Need to run 'git submodule init $(1)' in esp-idf root directory."; exit 1)
+       [ -e ${IDF_PATH}/.git ] || { echo "ERROR: esp-idf must be cloned from git to work."; exit 1; }
+       [ -x "$(shell which git)" ] || { echo "ERROR: Need to run 'git submodule init $(1)' in esp-idf root directory."; exit 1; }
        @echo "Attempting 'git submodule update --init $(1)' in esp-idf root directory..."
        cd ${IDF_PATH} && git submodule update --init $(1)
 
index 2d4caa655126bb89d063ccc371e511312a9cfd58..1ad5f430ca80523e7bc0e68365fce4a22f460913 100755 (executable)
@@ -16,7 +16,7 @@ function assert_branch_public()
         set -e
         source ./configure_ci_environment.sh
         [[ $IS_PUBLIC = $2 ]] || exit 1
-    ) || ( echo "Expected $1 public=$2. Failing" && exit 1 )
+    ) || { echo "Expected $1 public=$2. Failing"; exit 1; }
 }
 
 assert_branch_public master 1