mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-20 07:35:10 +00:00
This reverts commit b8c9c25ab1d423e5c3aefb3903399a6c1b64bae3, reversing changes made to 19ffec8f3e520e1f08af6a7583b84852f6e6f0fe.
27 lines
669 B
Bash
Executable File
27 lines
669 B
Bash
Executable File
if [ -z "$1" ]; then
|
|
echo "Must supply dotnet version argument"
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -f "../nuget.config" ]; then
|
|
echo "nuget file not generated correctly"
|
|
exit 1
|
|
fi
|
|
|
|
dotnet_version="$(dotnet --version)"
|
|
echo "Found dotnet version '$dotnet_version'"
|
|
if [ -z "$(echo $dotnet_version | grep $1)" ]; then
|
|
echo "Unexpected version"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Building sample csproj"
|
|
dotnet build __tests__/sample-csproj/ --no-cache || exit 1
|
|
|
|
echo "Testing compiled app"
|
|
sample_output="$(__tests__/sample-csproj/bin/Debug/netcoreapp3.0/sample)"
|
|
echo "Sample output: $sample_output"
|
|
if [ -z "$(echo $sample_output | grep Hello)" ]; then
|
|
echo "Unexpected output"
|
|
exit 1
|
|
fi |