From 1af36c57f8e2195c82e7b1af6ba2c20c2f25df8f Mon Sep 17 00:00:00 2001 From: Dong Heng Date: Wed, 30 Sep 2020 17:06:34 +0800 Subject: [PATCH] chore(ci): Modify CI env setup --- .gitlab-ci.yml | 6 ++---- tools/idf_tools.py | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 91dd84ce..35717b60 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,8 +25,7 @@ before_script: - *apply_bot_filter - echo "Not setting up GitLab key, fetching submodules ..." - git submodule update --init --recursive - - ./install.sh - - . ./export.sh + - tools/idf_tools.py --non-interactive install && eval "$(tools/idf_tools.py --non-interactive export)" || exit 1 - source tools/ci/configure_ci_environment.sh .build_template: &build_template @@ -42,8 +41,7 @@ build_ssc: - ./SSC/ssc_bin expire_in: 6 mos script: - - ./install.sh - - . ./export.sh + - tools/idf_tools.py --non-interactive install && eval "$(tools/idf_tools.py --non-interactive export)" || exit 1 - git clone $GITLAB_SSH_SERVER/yinling/SSC.git - cd SSC # try checkout same branch diff --git a/tools/idf_tools.py b/tools/idf_tools.py index 21c8f690..73b63286 100755 --- a/tools/idf_tools.py +++ b/tools/idf_tools.py @@ -796,7 +796,7 @@ def get_python_env_path(): idf_version_str = version_file.read() else: idf_version_str = subprocess.check_output(['git', '-C', global_idf_path, 'describe', '--tags'], cwd=global_idf_path, env=os.environ).decode() - match = re.match(r'^v([0-9]+\.[0-9]+).*', idf_version_str) + match = re.search(r'v([0-9]+\.[0-9]+).*', idf_version_str) idf_version = match.group(1) idf_python_env_path = os.path.join(global_idf_tools_path, 'python_env',