Dedup Linux build scripts

inb4 "how is this deduplicating when you added a bunch of code"
This commit is contained in:
YoshiRulz 2021-04-03 11:47:50 +10:00
parent 56916fbbca
commit 84e195659c
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
7 changed files with 34 additions and 8 deletions

9
Dist/.BuildInConfigX.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
set -e
if [ ! -e "BizHawk.sln" ]; then
printf "wrong cwd (ran manually)? exiting\n"
exit 1
fi
config="$1"
shift
Dist/.InvokeCLIOnMainSln.sh "build" "$config" "$@"

8
Dist/.BuildTestInConfigX.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
if [ ! -e "BizHawk.sln" ]; then
printf "wrong cwd (ran manually)? exiting\n"
exit 1
fi
config="$1"
shift
Dist/.InvokeCLIOnMainSln.sh "test" "$config" -a . -l "junit;LogFilePath=$PWD/test_output/{assembly}.coverage.xml;MethodFormat=Class;FailureBodyFormat=Verbose" "$@"

13
Dist/.InvokeCLIOnMainSln.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
set -e
if [ ! -e "BizHawk.sln" ]; then
printf "wrong cwd (ran manually)? exiting\n"
exit 1
fi
cmd="$1"
shift
config="$1"
shift
if [ -z "$NUGET_PACKAGES" ]; then export NUGET_PACKAGES="$HOME/.nuget/packages"; fi
printf "running 'dotnet %s' in %s configuration, extra args: %s\n" "$cmd" "$config" "$*"
dotnet "$cmd" BizHawk.sln -c "$config" -m -clp:NoSummary "$@"

View File

@ -1,3 +1,2 @@
#!/bin/sh
if [ -z "$NUGET_PACKAGES" ]; then export NUGET_PACKAGES="$HOME/.nuget/packages"; fi
cd "$(dirname "$0")/.." && dotnet build BizHawk.sln -c Debug -m -clp:NoSummary "$@"
cd "$(dirname "$0")/.." && Dist/.BuildInConfigX.sh "Debug" "$@"

View File

@ -1,3 +1,2 @@
#!/bin/sh
if [ -z "$NUGET_PACKAGES" ]; then export NUGET_PACKAGES="$HOME/.nuget/packages"; fi
cd "$(dirname "$0")/.." && dotnet build BizHawk.sln -c Release -m -clp:NoSummary "$@"
cd "$(dirname "$0")/.." && Dist/.BuildInConfigX.sh "Release" "$@"

View File

@ -1,3 +1,2 @@
#!/bin/sh
if [ -z "$NUGET_PACKAGES" ]; then export NUGET_PACKAGES="$HOME/.nuget/packages"; fi
cd "$(dirname "$0")/.." && dotnet test BizHawk.sln -a . -c Debug -l "junit;LogFilePath=$PWD/test_output/{assembly}.coverage.xml;MethodFormat=Class;FailureBodyFormat=Verbose" -m -clp:NoSummary "$@"
cd "$(dirname "$0")/.." && Dist/.BuildTestInConfigX.sh "Debug" "$@"

View File

@ -1,3 +1,2 @@
#!/bin/sh
if [ -z "$NUGET_PACKAGES" ]; then export NUGET_PACKAGES="$HOME/.nuget/packages"; fi
cd "$(dirname "$0")/.." && dotnet test BizHawk.sln -a . -c Release -l "junit;LogFilePath=$PWD/test_output/{assembly}.coverage.xml;MethodFormat=Class;FailureBodyFormat=Verbose" -m -clp:NoSummary "$@"
cd "$(dirname "$0")/.." && Dist/.BuildTestInConfigX.sh "Release" "$@"