mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-09 22:21:39 +02:00
fix workflow
This commit is contained in:
parent
209d648651
commit
e74d3f457f
2 changed files with 3 additions and 20 deletions
|
@ -3,30 +3,13 @@ import os
|
|||
import gzip
|
||||
import glob
|
||||
import shutil
|
||||
import pkg_resources
|
||||
from datetime import date
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
|
||||
Import("env")
|
||||
|
||||
required_pkgs = {'dulwich'}
|
||||
installed_pkgs = {pkg.key for pkg in pkg_resources.working_set}
|
||||
missing_pkgs = required_pkgs - installed_pkgs
|
||||
|
||||
if missing_pkgs:
|
||||
env.Execute('"$PYTHONEXE" -m pip install dulwich')
|
||||
|
||||
from dulwich import porcelain
|
||||
|
||||
def get_git_sha():
|
||||
try:
|
||||
build_version = porcelain.describe('../../../') # refers to the repository root dir
|
||||
except:
|
||||
build_version = "g0000000"
|
||||
|
||||
build_flag = "-D AUTO_GIT_HASH=\\\"" + build_version[1:] + "\\\""
|
||||
#print ("Firmware Revision: " + build_version)
|
||||
return (build_flag)
|
||||
return subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).decode('ascii').strip()
|
||||
|
||||
def readVersion(path):
|
||||
f = open(path, "r")
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</div>
|
||||
<div class="right">
|
||||
<ul>
|
||||
<li>{#VERSION}</li>
|
||||
<li>{#VERSION_GIT}</li>
|
||||
<li><span id="esp_type"></span></li>
|
||||
<li><a href="https://creativecommons.org/licenses/by-nc-sa/3.0/de" target="_blank" >CC BY-NC-SA 3.0</a></li>
|
||||
</ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue