mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-06-29 05:30:25 -04:00
sort filenames in gen_blocks for deterministic build order
This commit is contained in:
parent
b34225ddc4
commit
c58984206a
1 changed files with 5 additions and 0 deletions
5
build.py
5
build.py
|
@ -272,6 +272,10 @@ class Gen_compressed(threading.Thread):
|
|||
elif block_type == "common":
|
||||
target_filename = "blocks_compressed.js"
|
||||
filenames = glob.glob(os.path.join("blocks_common", "*.js"))
|
||||
|
||||
# glob.glob ordering is platform-dependent and not necessary deterministic
|
||||
filenames.sort() # Deterministic build.
|
||||
|
||||
# Define the parameters for the POST request.
|
||||
params = [
|
||||
("compilation_level", "SIMPLE"),
|
||||
|
@ -283,6 +287,7 @@ class Gen_compressed(threading.Thread):
|
|||
# Add Blockly.Colours for use of centralized colour bank
|
||||
filenames.append(os.path.join("core", "colours.js"))
|
||||
filenames.append(os.path.join("core", "constants.js"))
|
||||
|
||||
for filename in filenames:
|
||||
# Append filenames as false arguments the step before compiling will
|
||||
# either transform them into arguments for local or remote compilation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue