Skip to content

Commit

Permalink
Merge pull request #1 from SmOeL-swdev/develop/libversion
Browse files Browse the repository at this point in the history
Develop/libversion
  • Loading branch information
SmOeL-swdev authored Jul 22, 2023
2 parents 9540ebe + 845c5c3 commit 2d55510
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 992 deletions.
15 changes: 15 additions & 0 deletions gitversion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import subprocess

Import("env")

def get_firmware_specifier_build_flag():
ret = subprocess.run(["git", "describe", "--tags"], stdout=subprocess.PIPE, text=True) #Uses only annotated tags
#ret = subprocess.run(["git", "describe", "--tags"], stdout=subprocess.PIPE, text=True) #Uses any tags
build_version = ret.stdout.strip()
build_flag = "-D AUTO_VERSION=\\\"" + build_version + "\\\""
print ("Firmware Revision: " + build_version)
return (build_flag)

env.Append(
BUILD_FLAGS=[get_firmware_specifier_build_flag()]
)
46 changes: 0 additions & 46 deletions lib/README

This file was deleted.

Loading

0 comments on commit 2d55510

Please sign in to comment.