Updated scripts for actions

This commit is contained in:
Magnus Persson
2022-01-08 09:30:19 +01:00
parent 1928dbb749
commit 1894bc4959
2 changed files with 6 additions and 5 deletions

View File

@ -11,13 +11,13 @@ def after_build(source, target, env):
print( "Executing custom step " )
dir = env.GetLaunchDir()
name = env.get( "PIOENV" )
source = dir + "\\.pio\\build\\" + name + "\\firmware.bin"
source = dir + "/.pio/build/" + name + "/firmware.bin"
if name == "gravity-debug" :
target = dir + "\\bin\\firmware-debug.bin"
target = dir + "/bin/firmware-debug.bin"
if name == "gravity-release" :
target = dir + "\\bin\\firmware.bin"
target = dir + "/bin/firmware.bin"
if name == "gravity-perf" :
target = dir + "\\bin\\firmware-perf.bin"
target = dir + "/bin/firmware-perf.bin"
print( "Copy file : " + source + " -> " + target )
shutil.copyfile( source, target )

View File

@ -1,5 +1,5 @@
Import("env")
import shutil
import shutil, os
print( "Executing custom step " )
dir = env.GetLaunchDir()
@ -7,6 +7,7 @@ source = dir + "/html/"
target = dir + "/data/"
print( "Copy html-files from " + source + " -> " + target )
os.makedirs(os.path.dirname( target ), exist_ok=True)
file = "about.min.htm"
print( "Copy file: " + source + file + "->" + target + file)
shutil.copyfile( source + file, target + file )