Files
OpenRA/packaging/package-all.sh
let5sne.win10 9cf6ebb986
Some checks failed
Continuous Integration / Linux (.NET 8.0) (push) Has been cancelled
Continuous Integration / Windows (.NET 8.0) (push) Has been cancelled
Initial commit: OpenRA game engine
Fork from OpenRA/OpenRA with one-click launch script (start-ra.cmd)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 21:46:54 +08:00

39 lines
842 B
Bash

#!/bin/bash
# OpenRA master packaging script
set -o errexit -o pipefail || exit $?
if [ $# -ne "2" ]; then
echo "Usage: $(basename "$0") version outputdir."
exit 1
fi
export GIT_TAG="$1"
export BUILD_OUTPUT_DIR="$2"
# Set the working dir to the location of this script
HERE=$(dirname "$0")
cd "${HERE}"
#build packages using a subshell so directory changes do not persist beyond the function
function build_package() (
function on_build() {
echo "$1 package build failed." 1>&2
}
#trap function executes on any error in the following commands
trap "on_build $1" ERR
echo "Building $1 package(s)."
cd "$1"
./buildpackage.sh "${GIT_TAG}" "${BUILD_OUTPUT_DIR}"
)
if [[ "$OSTYPE" == "darwin"* ]]; then
build_package macos
else
build_package windows
build_package linux
build_package source
fi
echo "Package build done."