mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-01 02:09:57 +00:00
use sha in build filenames
This commit is contained in:
parent
50f739bacf
commit
361556a6a7
2
.gitignore
vendored
2
.gitignore
vendored
@ -19,4 +19,4 @@ Thumbs.db
|
||||
nanopb*
|
||||
flash.uf2
|
||||
cmake-build*
|
||||
|
||||
__pycache__
|
@ -1,11 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
import configparser
|
||||
from readprops import readProps
|
||||
|
||||
config = configparser.RawConfigParser()
|
||||
config.read('version.properties')
|
||||
|
||||
version = dict(config.items('VERSION'))
|
||||
|
||||
verStr = "{}.{}.{}".format(version["major"], version["minor"], version["build"])
|
||||
|
||||
verStr = readProps('version.properties')
|
||||
print(f"{verStr}")
|
||||
|
@ -4,32 +4,14 @@ import subprocess
|
||||
import configparser
|
||||
import traceback
|
||||
import sys
|
||||
from readprops import readProps
|
||||
|
||||
Import("projenv")
|
||||
|
||||
prefsLoc = projenv["PROJECT_DIR"] + "/version.properties"
|
||||
config = configparser.RawConfigParser()
|
||||
config.read(prefsLoc)
|
||||
version = dict(config.items('VERSION'))
|
||||
|
||||
# Try to find current build SHA if if the workspace is clean. This could fail if git is not installed
|
||||
try:
|
||||
sha = subprocess.check_output(
|
||||
['git', 'rev-parse', '--short', 'HEAD']).decode("utf-8").strip()
|
||||
isDirty = subprocess.check_output(
|
||||
['git', 'diff', 'HEAD']).decode("utf-8").strip()
|
||||
suffix = sha
|
||||
if isDirty:
|
||||
suffix = sha + "-dirty"
|
||||
verStr = "{}.{}.{}.{}".format(
|
||||
version["major"], version["minor"], version["build"], suffix)
|
||||
except:
|
||||
print("Unexpected error:", sys.exc_info()[0])
|
||||
traceback.print_exc()
|
||||
verStr = "{}.{}.{}".format(
|
||||
version["major"], version["minor"], version["build"])
|
||||
|
||||
verStr = readProps(prefsLoc)
|
||||
print("Using meshtastic platform-custom.py, firmare version " + verStr)
|
||||
# print("path is" + ','.join(sys.path))
|
||||
|
||||
# General options that are passed to the C and C++ compilers
|
||||
projenv.Append(CCFLAGS=[
|
||||
|
Loading…
Reference in New Issue
Block a user