mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-28 02:20:34 +08:00
git_tag: make sure to search for last valid tage beginning with vx.y.z only
This commit is contained in:
+1
-1
@@ -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 --exclude ext/* --abbrev=0 --tags'
|
||||
cmd = 'git describe --exclude ext/* --match v[0-9]*.[0-9]*.[0-9]* --abbrev=0 --tags'
|
||||
try:
|
||||
version = subprocess.check_output(
|
||||
cmd, cwd=px4_dir, shell=True).decode().strip()
|
||||
|
||||
Reference in New Issue
Block a user