A lightweight yet feature-rich Bash script for building WoltLab Suite™ Core packages.
To use this build script, follow the steps below:
Place the build.sh
script in the root directory of your project. If you cloned this repository elsewhere, you can create a symbolic link to the script from your project root:
ln -s /path/to/wsc-package-build-script/build.sh build.sh
Next, create a .packageinfo
file in the same directory as build.sh
. This file contains essential metadata such as the package identifier and, optionally, additional directories to be archived.
A minimal example:
packageIdentifier=software.krymo.woltlab.suite.core.sample
By default, the script includes the following directories in the package archive, if they exist:
acptemplates
files
style
templates
To include additional directories (e.g., files_update
or templates_update
), extend your .packageinfo
file like so:
packageIdentifier=software.krymo.woltlab.suite.core.sample
packageArchives=files_update;templates_update
Note: Multiple directories must be separated by a semicolon (;
). This will generate additional archives such as files_update.tar
and templates_update.tar
in the build/
directory.
Run the build.sh
script. Upon completion, the generated package(s) will be located in the build/
directory.
This script relies on git archive
, so your project must be a Git repository.
To exclude specific files or directories from the package archive, use a .gitattributes
file in your project root. For example:
.DS_Store export-ignore
.gitattributes export-ignore
.gitignore export-ignore
constants.php export-ignore
package.json export-ignore
package-lock.json export-ignore
tsconfig.json export-ignore
acptemplates/ export-ignore
files/ export-ignore
templates/ export-ignore
ts/ export-ignore
In addition, the script also respects your .gitignore
file and will exclude ignored files from the archive accordingly.