diff --git a/Dist/.BuildInConfigX.sh b/Dist/.BuildInConfigX.sh new file mode 100755 index 0000000000..fdcafac199 --- /dev/null +++ b/Dist/.BuildInConfigX.sh @@ -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" "$@" diff --git a/Dist/.BuildTestInConfigX.sh b/Dist/.BuildTestInConfigX.sh new file mode 100755 index 0000000000..41f081ade9 --- /dev/null +++ b/Dist/.BuildTestInConfigX.sh @@ -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" "$@" diff --git a/Dist/.InvokeCLIOnMainSln.sh b/Dist/.InvokeCLIOnMainSln.sh new file mode 100755 index 0000000000..18022fd30a --- /dev/null +++ b/Dist/.InvokeCLIOnMainSln.sh @@ -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 "$@" diff --git a/Dist/BuildDebug.sh b/Dist/BuildDebug.sh index b4528f54be..73fe0021a3 100755 --- a/Dist/BuildDebug.sh +++ b/Dist/BuildDebug.sh @@ -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" "$@" diff --git a/Dist/BuildRelease.sh b/Dist/BuildRelease.sh index 7baaefecb5..3fae43ca8c 100755 --- a/Dist/BuildRelease.sh +++ b/Dist/BuildRelease.sh @@ -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" "$@" diff --git a/Dist/BuildTestDebug.sh b/Dist/BuildTestDebug.sh index 8c2ce2db7e..0c9fe2c756 100755 --- a/Dist/BuildTestDebug.sh +++ b/Dist/BuildTestDebug.sh @@ -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" "$@" diff --git a/Dist/BuildTestRelease.sh b/Dist/BuildTestRelease.sh index e5fa2303d0..906e15e00d 100755 --- a/Dist/BuildTestRelease.sh +++ b/Dist/BuildTestRelease.sh @@ -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" "$@"