tools: Use git describe --match for filtering out internal names

This commit is contained in:
Roland Dobai
2021-02-17 14:04:04 +01:00
committed by bot
parent ced15b0dc0
commit 48488f1683
4 changed files with 20 additions and 3 deletions

View File

@@ -55,7 +55,8 @@ def idf_version():
version = subprocess.check_output([
'git',
'--git-dir=%s' % os.path.join(os.environ['IDF_PATH'], '.git'),
'--work-tree=%s' % os.environ['IDF_PATH'], 'describe', '--tags', '--dirty'
'--work-tree=%s' % os.environ['IDF_PATH'],
'describe', '--tags', '--dirty', '--match', 'v*.*',
]).decode('utf-8', 'ignore').strip()
except (subprocess.CalledProcessError, UnicodeError):
# if failed, then try to parse cmake.version file