mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-11 07:56:39 +02:00
complete rework of release workflow add CHANGES.md
This commit is contained in:
parent
18881fdffc
commit
fdf45926cc
5 changed files with 115 additions and 81 deletions
|
@ -9,23 +9,22 @@ def readVersion(path, infile):
|
|||
today = date.today()
|
||||
search = ["_MAJOR", "_MINOR", "_PATCH"]
|
||||
version = today.strftime("%y%m%d") + "_ahoy_"
|
||||
versionnumber = "ahoy_v"
|
||||
for line in lines:
|
||||
if(line.find("VERSION_") != -1):
|
||||
for s in search:
|
||||
p = line.find(s)
|
||||
if(p != -1):
|
||||
version += line[p+13:].rstrip() + "."
|
||||
versionnumber += line[p+13:].rstrip() + "."
|
||||
|
||||
os.mkdir(path + ".pio/build/out/")
|
||||
|
||||
versionout = version[:-1] + "_esp8266_release.bin"
|
||||
sha = os.getenv("SHA",default="sha")
|
||||
versionout = version[:-1] + "_esp8266_" + sha + ".bin"
|
||||
src = path + ".pio/build/esp8266-release/firmware.bin"
|
||||
dst = path + ".pio/build/out/" + versionout
|
||||
os.rename(src, dst)
|
||||
print("::set-output name=name::" + versionnumber[:-1] )
|
||||
|
||||
versionout = version[:-1] + "_esp8266_debug.bin"
|
||||
src = path + ".pio/build/esp8266-debug/firmware.bin"
|
||||
dst = path + ".pio/build/out/" + versionout
|
||||
os.rename(src, dst)
|
||||
|
||||
readVersion("../", "defines.h")
|
||||
|
||||
readVersion("../", "defines.h")
|
Loading…
Add table
Add a link
Reference in a new issue