mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-26 12:13:10 +00:00
Finalized live update of meter data in web gui
This commit is contained in:
16
addversion.py
Normal file
16
addversion.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import os
|
||||
|
||||
FILENAME_VERSION_H = 'src/version.h'
|
||||
version = os.environ.get('GITHUB_REF')
|
||||
if version == None:
|
||||
version = "SNAPSHOT"
|
||||
|
||||
import datetime
|
||||
|
||||
hf = """
|
||||
#ifndef VERSION
|
||||
#define VERSION "{}"
|
||||
#endif
|
||||
""".format(version)
|
||||
with open(FILENAME_VERSION_H, 'w+') as f:
|
||||
f.write(hf)
|
||||
Reference in New Issue
Block a user