meshtasticd-debian: Include run in version (#5762)

This commit is contained in:
Austin 2025-01-05 16:55:04 -05:00 committed by GitHub
parent b0087fd328
commit 403fa15a3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,7 @@
import configparser
import subprocess
import os
run_number = os.getenv('GITHUB_RUN_NUMBER', '0')
def readProps(prefsLoc):
"""Read the version of our project as a string"""
@ -29,12 +30,12 @@ def readProps(prefsLoc):
# # short for 'dirty', we want to keep our verstrings source for protobuf reasons
# suffix = sha + "-d"
verObj["long"] = "{}.{}".format(verObj["short"], suffix)
verObj["deb"] = "{}-ppa{}".format(verObj["short"], sha)
verObj["deb"] = "{}-{}~ppa{}".format(verObj["short"], run_number, sha)
except:
# print("Unexpected error:", sys.exc_info()[0])
# traceback.print_exc()
verObj["long"] = verObj["short"]
verObj["deb"] = "{}-ppa".format(verObj["short"])
verObj["deb"] = "{}-{}~ppa".format(verObj["short"], run_number)
# print("firmware version " + verStr)
return verObj