Browse Source

fix workflow

pull/729/head
lumapu 2 years ago
parent
commit
e74d3f457f
  1. 21
      src/web/html/convert.py
  2. 2
      src/web/html/includes/footer.html

21
src/web/html/convert.py

@ -3,30 +3,13 @@ import os
import gzip import gzip
import glob import glob
import shutil import shutil
import pkg_resources
from datetime import date from datetime import date
from pathlib import Path 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(): def get_git_sha():
try: return subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).decode('ascii').strip()
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)
def readVersion(path): def readVersion(path):
f = open(path, "r") f = open(path, "r")

2
src/web/html/includes/footer.html

@ -8,7 +8,7 @@
</div> </div>
<div class="right"> <div class="right">
<ul> <ul>
<li>{#VERSION}</li> <li>{#VERSION_GIT}</li>
<li><span id="esp_type"></span></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> <li><a href="https://creativecommons.org/licenses/by-nc-sa/3.0/de" target="_blank" >CC BY-NC-SA 3.0</a></li>
</ul> </ul>

Loading…
Cancel
Save