git: ignore git tags starting with 'ext/' when getting the version tag

Allows for external/extra tags
This commit is contained in:
Beat Küng
2021-02-18 13:22:36 +01:00
committed by Daniel Agar
parent ae010ea55c
commit bac2a02a65
4 changed files with 4 additions and 4 deletions

View File

@@ -65,7 +65,7 @@ def get_version():
if os.path.isdir(os.path.join(px4_dir, '.git')):
# If inside a clone PX4 Firmware repository, get version from "git describe"
cmd = 'git describe --abbrev=0 --tags'
cmd = 'git describe --exclude ext/* --abbrev=0 --tags'
try:
version = subprocess.check_output(
cmd, cwd=px4_dir, shell=True).decode().strip()