mirror of
https://github.com/btclock/btclock_v3.git
synced 2024-11-19 02:30:01 +01:00
Merge branch 'main' of https://github.com/btclock/btclock_v3
This commit is contained in:
commit
ef70203834
@ -10,6 +10,8 @@ def gzip_file(input_file, output_file):
|
||||
copyfileobj(f_in, f_out)
|
||||
|
||||
def process_directory(input_dir, output_dir):
|
||||
if os.path.exists(output_dir):
|
||||
rmtree(output_dir)
|
||||
for root, dirs, files in os.walk(input_dir):
|
||||
relative_path = os.path.relpath(root, input_dir)
|
||||
output_root = os.path.join(output_dir, relative_path)
|
||||
@ -30,7 +32,6 @@ def before_buildfs(source, target, env):
|
||||
env.Execute("cd data && yarn && PUBLIC_BASE_URL=\"\" yarn build")
|
||||
input_directory = 'data/dist'
|
||||
output_directory = 'data/build_gz'
|
||||
rmtree(output_directory)
|
||||
process_directory(input_directory, output_directory)
|
||||
|
||||
env.AddPreAction("$BUILD_DIR/littlefs.bin", before_buildfs)
|
||||
|
Loading…
Reference in New Issue
Block a user