📦 build: implement automated release-build script

This commit is contained in:
retrozinndev
2025-08-09 22:12:50 -03:00
parent 4df1a9e7c9
commit 33a7b9617b
3 changed files with 31 additions and 1 deletions
+27
View File
@@ -0,0 +1,27 @@
set -e
outdir="./build/release"
gresource_file='$XDG_LOCAL_HOME/colorshell/resources.gresource' # send literal variable name, so it's interpreted in the shell rather than in the build
while getopts o:r:h args; do
case "$args" in
o)
outdir=${OPTARG}
;;
r)
gresource_file=${OPTARG}
;;
h)
echo "\
colorshell's automated release-build script.
options:
-r \$file: gresource's target path (shell-only, file is kept in \$output. default: \$XDG_LOCAL_HOME/colorshell/resources.gresource)
-o \$path: build output path (default: \`./build/release\`)
-h: show this help message"
exit 0
;;
esac
done
pnpm build -o "${outdir:-./build/release}" -b -r "${gresource_file:-\$XDG_LOCAL_HOME/colorshell/resources.gresource}"