mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
1.9.0
This commit is contained in:
@@ -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(".", "_"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user