Skip to content

Commit 110fbfb

Browse files
committed
Rework builder script
- Update dependencies before each build - Use long name for compiling options - Rework command-line arguments building
1 parent ed47f6a commit 110fbfb

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

build.sh

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,28 @@ then
2323
exit 1
2424
fi
2525

26+
# Ensure dependencies are up-to-date
27+
offenbach install --no-dev --no-interaction --optimize-autoloader
28+
29+
# Update version in main application bootstrap file
2630
sed -i "s/\$VERSION *=.*/\$VERSION = '$version';/" $main
2731

28-
php -dphar.readonly=0 bin/compile.php -d src:php -d vendor:php -e $main -o $phar -b .banner -m license:MIT -m author:yannoff -m copyright:yannoff
32+
args=()
33+
34+
# Add src/ & vendor/ as source directories
35+
args+=(--dir src:php)
36+
args+=(--dir vendor:php)
37+
38+
# Set bootstrap & output properties
39+
args+=(--main $main)
40+
args+=(--output $phar)
41+
42+
# Set the legal banner file
43+
args+=(--banner .banner)
44+
45+
# Add archive metadata properties
46+
args+=(--meta license:MIT)
47+
args+=(--meta author:yannoff)
48+
args+=(--meta copyright:yannoff)
49+
50+
php -dphar.readonly=0 bin/compile.php "${args[@]}"

0 commit comments

Comments
 (0)