Skip to content

Commit c7d92ed

Browse files
committed
Attempt to build images headless on netlify
1 parent bd930e1 commit c7d92ed

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

‎headless_build_script.sh‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
# Define the target directory from the first script argument, default to current directory if not provided
4+
TARGET_DIR="${1:-.}"
5+
6+
# Fetch Processing JAR
7+
bash -c "./fetch_processing_jar.sh $TARGET_DIR"
8+
9+
# Change to the target directory
10+
cd $TARGET_DIR
11+
12+
# Run the build command with xvfb-run
13+
echo "Running in a headless environment. Building with xvfb..."
14+
xvfb-run python generator.py build --all --images

‎netlify.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[build]
2-
command = "java -version && bash -c './fetch_processing_jar.sh /opt/build/repo/ && python generator.py build --all --images'"
2+
command = "bash -c './headless_build_script.sh /opt/build/repo/'"
33
publish = "generated"

0 commit comments

Comments
 (0)