mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-12 00:02:53 +00:00
Commit hash as version
This commit is contained in:
parent
244f78ad1a
commit
5f0adc0f10
@ -1,9 +1,11 @@
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
FILENAME_VERSION_H = 'src/version.h'
|
||||
version = os.environ.get('GITHUB_TAG')
|
||||
if version == None:
|
||||
version = "SNAPSHOT"
|
||||
result = subprocess.run(['git','rev-parse','--short','HEAD'], stdout=subprocess.PIPE)
|
||||
version = result.stdout.decode('utf-8').strip()
|
||||
|
||||
import datetime
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user