mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-13 15:37:03 +00:00
17 lines
283 B
Python
17 lines
283 B
Python
import os
|
|
|
|
FILENAME_VERSION_H = 'src/version.h'
|
|
version = os.environ.get('GITHUB_TAG')
|
|
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)
|