1.9.0 web - new implementation

This commit is contained in:
Paul
2019-08-02 09:26:13 +02:00
parent 89818b23bd
commit fc52f05453
41 changed files with 7206 additions and 931 deletions

View File

@@ -1,7 +1,13 @@
#!/usr/bin/env python
from subprocess import call
import os
import re
Import("env")
def build_web(source, target, env):
print("\n** Build web...")
call(["gulp", "-f", os.getcwd()+"/tools/webfilesbuilder/gulpfile.js"])
bag = {}
exprs = [
(re.compile(r'^#define APP_VERSION\s+"(\S+)"'), 'app_version'),
@@ -22,5 +28,9 @@ app_hostname = bag.get('app_hostname')
board = env['BOARD']
branch = env['PIOENV']
# build the web files
env.AddPreAction("buildprog", build_web)
# build filename, replacing . with _ for the version
env.Replace(PROGNAME="firmware_%s" % branch + "_" + app_version.replace(".", "_"))