diff --git a/CMakeLists.txt b/CMakeLists.txt index b945b2947e..91de839b42 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,7 +113,7 @@ include(px4_parse_function_args) include(px4_git) execute_process( - COMMAND git describe --always --tags + COMMAND git describe --exclude ext/* --always --tags OUTPUT_VARIABLE PX4_GIT_TAG OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY ${PX4_SOURCE_DIR} diff --git a/Tools/px4.py b/Tools/px4.py index 8e09c5079e..4136758873 100755 --- a/Tools/px4.py +++ b/Tools/px4.py @@ -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() diff --git a/Tools/px_mkfw.py b/Tools/px_mkfw.py index 3484576150..b6638eeffd 100755 --- a/Tools/px_mkfw.py +++ b/Tools/px_mkfw.py @@ -99,7 +99,7 @@ if args.summary != None: if args.description != None: desc['description'] = str(args.description) if args.git_identity != None: - cmd = "git --git-dir '{:}/.git' describe --always --tags".format(args.git_identity) + cmd = "git --git-dir '{:}/.git' describe --exclude ext/* --always --tags".format(args.git_identity) p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout desc['git_identity'] = str(p.read().strip()) p.close() diff --git a/src/lib/version/px_update_git_header.py b/src/lib/version/px_update_git_header.py index 8baea33419..7e455dfa0a 100755 --- a/src/lib/version/px_update_git_header.py +++ b/src/lib/version/px_update_git_header.py @@ -37,7 +37,7 @@ header = """ # PX4 -git_tag = subprocess.check_output('git describe --always --tags --dirty'.split(), +git_tag = subprocess.check_output('git describe --exclude ext/* --always --tags --dirty'.split(), stderr=subprocess.STDOUT).decode('utf-8').strip() if validate: if verbose: