Skip to content

Commit

Permalink
fix build tag for firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
mumrah committed Sep 20, 2023
1 parent 2012b84 commit 2604c59
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion firmware/build_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
)

if __name__ == "__main__":
ver = setuptools_scm.get_version(root="..", tag_regex=TAG_REGEX)
ver = setuptools_scm.get_version(root="..", tag_regex=TAG_REGEX, git_describe_command="git describe --tags --match firmware-*")
now = datetime.datetime.utcnow().replace(microsecond=0).isoformat()
print(f"-DBUILD_VERSION='\"{ver}\"' -DBUILD_DATE='\"{now}Z\"'")
10 changes: 6 additions & 4 deletions firmware/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
from setuptools import setup, find_packages
import setuptools_scm

TAG_REGEX = re.compile(
r"^firmware-(?:[\w-]+-)?(?P<version>[vV]?\d+(?:\.\d+){0,2}[^\+]*)(?:\+.*)?$"
)
TAG_REGEX = r"^firmware-(?:[\w-]+-)?(?P<version>[vV]?\d+(?:\.\d+){0,2}[^\+]*)(?:\+.*)?$"


def get_version():
return setuptools_scm.get_version(root="..", tag_regex=TAG_REGEX)
return setuptools_scm.get_version(
root="..",
tag_regex=TAG_REGEX,
git_describe_command="git describe --tags --match firmware-*")


setup(
Expand Down

0 comments on commit 2604c59

Please sign in to comment.