TRX/tools/shared/docker/config/entrypoint.sh

26 lines
598 B
Bash
Raw Normal View History

2024-10-02 10:19:36 +02:00
#!/bin/bash
set -x
set -e
2025-03-31 00:32:09 +02:00
if [[ -z "$1" || ( "$1" != "1" && "$1" != "2" ) ]]; then
echo "Error: You must supply '1' or '2' as an argument to decide which game to build."
exit 1
fi
TR_VERSION=$1
2024-10-02 10:19:36 +02:00
export DOTNET_CLI_HOME="/tmp/DOTNET_CLI_HOME"
echo $HOME
shopt -s globstar
# Build the common lib DLL
2024-10-02 10:23:23 +02:00
cd /app/tools/config/
2024-10-02 10:19:36 +02:00
rm -rf **/bin **/obj
dotnet restore -p:EnableWindowsTargeting=true
dotnet publish -c Release -p:EnableWindowsTargeting=true
# Build the main executable
2025-03-31 00:32:09 +02:00
cd /app/tools/tr${TR_VERSION}/config/
2024-10-02 10:19:36 +02:00
rm -rf **/bin **/obj **/out/*
dotnet restore
dotnet publish -c Release -o out