forked from Archive/PX4-Autopilot
px_update_git_header:Extract latest release tag
This commit is contained in:
parent
82c1ffb8f8
commit
d6db06faf3
|
@ -148,8 +148,9 @@ if (os.path.exists('src/modules/mavlink/mavlink/.git')):
|
|||
|
||||
# NuttX
|
||||
if (os.path.exists('platforms/nuttx/NuttX/nuttx/.git')):
|
||||
nuttx_git_tag = subprocess.check_output('git describe --always --tags --match nuttx-* --dirty'.split(),
|
||||
cwd='platforms/nuttx/NuttX/nuttx', stderr=subprocess.STDOUT).decode('utf-8').strip().replace("nuttx-", "v")
|
||||
nuttx_git_tags = subprocess.check_output('git -c versionsort.suffix=- tag --sort=v:refname'.split(),
|
||||
cwd='platforms/nuttx/NuttX/nuttx', stderr=subprocess.STDOUT).decode('utf-8').strip()
|
||||
nuttx_git_tag = re.findall(r'nuttx-[0-9]+\.[0-9]+\.[0-9]+', nuttx_git_tags)[-1].replace("nuttx-", "v")
|
||||
nuttx_git_tag = re.sub('-.*', '.0', nuttx_git_tag)
|
||||
nuttx_git_version = subprocess.check_output('git rev-parse --verify HEAD'.split(),
|
||||
cwd='platforms/nuttx/NuttX/nuttx', stderr=subprocess.STDOUT).decode('utf-8').strip()
|
||||
|
|
Loading…
Reference in New Issue