mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
CI: get git describe from annotated tags:
we should only parse IDF version from annotated tags
This commit is contained in:
@ -33,7 +33,7 @@ cmake_ver_minor=$(get_ver_from_cmake IDF_VERSION_MINOR)
|
|||||||
cmake_ver_patch=$(get_ver_from_cmake IDF_VERSION_PATCH)
|
cmake_ver_patch=$(get_ver_from_cmake IDF_VERSION_PATCH)
|
||||||
version_from_cmake="${cmake_ver_major}.${cmake_ver_minor}.${cmake_ver_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]+))?.*$"
|
git_desc_regex="^v([0-9]+)\.([0-9]+)(\.([0-9]+))?.*$"
|
||||||
if [[ ! ${git_desc} =~ ${git_desc_regex} ]]; then
|
if [[ ! ${git_desc} =~ ${git_desc_regex} ]]; then
|
||||||
echo "Could not determine the version from 'git describe' output: ${git_desc}"
|
echo "Could not determine the version from 'git describe' output: ${git_desc}"
|
||||||
|
@ -35,7 +35,7 @@ def target_branch_candidates(proj_name):
|
|||||||
pass
|
pass
|
||||||
# branch name read from IDF
|
# branch name read from IDF
|
||||||
try:
|
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())
|
match = IDF_GIT_DESCRIBE_PATTERN.search(git_describe.decode())
|
||||||
if match:
|
if match:
|
||||||
major_revision = match.group(1)
|
major_revision = match.group(1)
|
||||||
|
Reference in New Issue
Block a user