This commit is contained in:
Paul
2019-09-01 12:39:40 +02:00
56 changed files with 17769 additions and 3322 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(".", "_"))