From ac545ce97cb5b7c6df302504b1f496323105e04b Mon Sep 17 00:00:00 2001 From: He Yin Ling Date: Tue, 29 Sep 2020 11:20:05 +0800 Subject: [PATCH] CI: get git describe from annotated tags: we should only parse IDF version from annotated tags --- tools/ci/check_idf_version.sh | 2 +- tools/ci/checkout_project_ref.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ci/check_idf_version.sh b/tools/ci/check_idf_version.sh index 36fdf003f..35135b89d 100755 --- a/tools/ci/check_idf_version.sh +++ b/tools/ci/check_idf_version.sh @@ -33,7 +33,7 @@ cmake_ver_minor=$(get_ver_from_cmake IDF_VERSION_MINOR) cmake_ver_patch=$(get_ver_from_cmake IDF_VERSION_PATCH) version_from_cmake="${cmake_ver_major}.${cmake_ver_minor}.${cmake_ver_patch}" -git_desc=$(git describe --tags) +git_desc=$(git describe) git_desc_regex="^v([0-9]+)\.([0-9]+)(\.([0-9]+))?.*$" if [[ ! ${git_desc} =~ ${git_desc_regex} ]]; then echo "Could not determine the version from 'git describe' output: ${git_desc}" diff --git a/tools/ci/checkout_project_ref.py b/tools/ci/checkout_project_ref.py index e9c060a1b..e7d0a8e6a 100755 --- a/tools/ci/checkout_project_ref.py +++ b/tools/ci/checkout_project_ref.py @@ -35,7 +35,7 @@ def target_branch_candidates(proj_name): pass # branch name read from IDF try: - git_describe = subprocess.check_output(["git", "describe", "--tags", "HEAD"]) + git_describe = subprocess.check_output(["git", "describe", "HEAD"]) match = IDF_GIT_DESCRIBE_PATTERN.search(git_describe.decode()) if match: major_revision = match.group(1)