Skip to content

Commit c4e43b3

Browse files
authored
Update cli to 2.0.3 (emgarten#26)
1 parent f2a0cb6 commit c4e43b3

File tree

11 files changed

+63
-58
lines changed

11 files changed

+63
-58
lines changed

build.sh

+3-46
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,11 @@
11
#!/usr/bin/env bash
22

33
RESULTCODE=0
4-
54
pushd $(pwd)
65

7-
# Download dotnet cli
8-
DOTNET="$(pwd)/.cli/dotnet"
9-
10-
11-
if [ ! -f $DOTNET ]; then
12-
echo "Installing dotnet"
13-
mkdir -p .cli
14-
curl -o .cli/dotnet-install.sh https://raw.githubusercontent.com/dotnet/cli/4bd9bb92cc3636421cd01baedbd8ef3e41aa1e22/scripts/obtain/dotnet-install.sh
15-
16-
# Run install.sh
17-
chmod +x .cli/dotnet-install.sh
18-
.cli/dotnet-install.sh -i .cli -c 2.0 -v 2.0.2
19-
.cli/dotnet-install.sh -i .cli -c preview -v 1.0.4
20-
fi
21-
22-
# Display info
23-
$DOTNET --info
24-
25-
# clean
26-
rm -r -f $(pwd)/artifacts
27-
28-
# Clean projects and write out git info
29-
$DOTNET msbuild build/build.proj /t:Clean\;WriteGitInfo /p:Configuration=Release /nologo /v:m
30-
31-
if [ $? -ne 0 ]; then
32-
echo "Clean;WriteGitInfo FAILED!"
33-
exit 1
34-
fi
35-
36-
# restore
37-
$DOTNET msbuild build/build.proj /t:Restore /p:Configuration=Release /nologo /v:m
38-
39-
if [ $? -ne 0 ]; then
40-
echo "Restore FAILED!"
41-
exit 1
42-
fi
43-
44-
# build
45-
$DOTNET msbuild build/build.proj /t:Build\;Test\;Pack /p:Configuration=Release /nologo /v:m
46-
47-
if [ $? -ne 0 ]; then
48-
echo "Build FAILED!"
49-
exit 1
50-
fi
6+
# Download dotnet cli and run tests
7+
. build/common/common.sh
8+
run_standard_tests
519

5210
popd
53-
5411
exit $RESULTCODE

build/common/common.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Function Install-DotnetCLI {
2222

2323
wget https://raw.githubusercontent.com/dotnet/cli/4bd9bb92cc3636421cd01baedbd8ef3e41aa1e22/scripts/obtain/dotnet-install.ps1 -OutFile $installDotnet
2424

25-
& $installDotnet -Channel 2.0 -i $CLIRoot -Version 2.0.2
25+
& $installDotnet -Channel 2.0 -i $CLIRoot -Version 2.0.3
2626
& $installDotnet -Channel preview -i $CLIRoot -Version 1.0.4
2727

2828
if (-not (Test-Path $DotnetExe)) {

build/common/common.sh

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/usr/bin/env bash
2+
3+
run_standard_tests()
4+
{
5+
pushd $(pwd)
6+
7+
# Download dotnet cli
8+
DOTNET="$(pwd)/.cli/dotnet"
9+
10+
11+
if [ ! -f $DOTNET ]; then
12+
echo "Installing dotnet"
13+
mkdir -p .cli
14+
curl -o .cli/dotnet-install.sh https://raw.githubusercontent.com/dotnet/cli/4bd9bb92cc3636421cd01baedbd8ef3e41aa1e22/scripts/obtain/dotnet-install.sh
15+
16+
# Run install.sh
17+
chmod +x .cli/dotnet-install.sh
18+
.cli/dotnet-install.sh -i .cli -c 2.0 -v 2.0.3
19+
.cli/dotnet-install.sh -i .cli -c preview -v 1.0.4
20+
fi
21+
22+
# Display info
23+
$DOTNET --info
24+
25+
# clean
26+
rm -r -f $(pwd)/artifacts
27+
28+
# Clean projects and write out git info
29+
$DOTNET msbuild build/build.proj /t:Clean\;WriteGitInfo /p:Configuration=Release /nologo /v:m
30+
31+
if [ $? -ne 0 ]; then
32+
echo "Clean;WriteGitInfo FAILED!"
33+
exit 1
34+
fi
35+
36+
# restore
37+
$DOTNET msbuild build/build.proj /t:Restore /p:Configuration=Release /nologo /v:m
38+
39+
if [ $? -ne 0 ]; then
40+
echo "Restore FAILED!"
41+
exit 1
42+
fi
43+
44+
# build
45+
$DOTNET msbuild build/build.proj /t:Build\;Test\;Pack /p:Configuration=Release /nologo /v:m
46+
47+
if [ $? -ne 0 ]; then
48+
echo "Build FAILED!"
49+
exit 1
50+
fi
51+
52+
popd
53+
}

build/common/common.shared.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<PackagesConfigDirectory>$(RepositoryRootDirectory).nuget\packages\</PackagesConfigDirectory>
2020
<CIRootDirectory>$(RepositoryRootDirectory).ci\</CIRootDirectory>
2121
<MSBuildArtifactsDirectory>$(RepositoryRootDirectory)artifacts\msbuild\</MSBuildArtifactsDirectory>
22-
<XunitConsoleExePath>$(PackagesConfigDirectory)xunit.runner.console.2.3.0\tools\net452\xunit.console.exe</XunitConsoleExePath>
22+
<XunitConsoleExePath>$(PackagesConfigDirectory)xunit.runner.console.2.3.1\tools\net452\xunit.console.exe</XunitConsoleExePath>
2323
<NupkgOutputDirectory>$(ArtifactsDirectory)nupkgs\</NupkgOutputDirectory>
2424
<PublishOutputDirectory>$(ArtifactsDirectory)publish\</PublishOutputDirectory>
2525
<LogOutputDirectory>$(ArtifactsDirectory)logs\</LogOutputDirectory>

build/common/common.targets

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<PropertyGroup>
3333
<FluentAssertionsVersion Condition=" '$(FluentAssertionsVersion)' == '' ">4.19.4</FluentAssertionsVersion>
3434
<ToStringWithoutOverrideAnalyzerVersion Condition=" '$(ToStringWithoutOverrideAnalyzerVersion)' == '' ">0.5.0</ToStringWithoutOverrideAnalyzerVersion>
35-
<TestSDKVersion Condition=" '$(TestSDKVersion)' == '' ">15.0.0</TestSDKVersion>
35+
<TestSDKVersion Condition=" '$(TestSDKVersion)' == '' ">15.5.0</TestSDKVersion>
3636
<XunitVersion Condition=" '$(XunitVersion)' == '' ">2.3.1</XunitVersion>
3737
<XunitRunnerVisualStudioVersion Condition=" '$(XunitRunnerVisualStudioVersion)' == '' ">$(XunitVersion)</XunitRunnerVisualStudioVersion>
3838
<SourceLinkVersion Condition=" '$(SourceLinkVersion)' == '' ">2.5.0</SourceLinkVersion>
@@ -68,7 +68,6 @@
6868
<PropertyGroup Condition=" '$(TestProject)' == 'true' ">
6969
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
7070
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
71-
<OutputType>Exe</OutputType>
7271
</PropertyGroup>
7372

7473
<ItemGroup Condition=" '$(TestProject)' == 'true' ">
@@ -149,8 +148,9 @@
149148
Returns="@(TestAssemblyPath)">
150149

151150
<PropertyGroup>
152-
<TestAssemblyRelativePath Condition=" '$(IsDesktop)' == 'true' ">$(OutputPath)$(AssemblyName).exe</TestAssemblyRelativePath>
153-
<TestAssemblyRelativePath Condition=" '$(IsDesktop)' != 'true' ">$(OutputPath)$(AssemblyName).dll</TestAssemblyRelativePath>
151+
<TestAssemblyRelativePath>$(OutputPath)$(AssemblyName).dll</TestAssemblyRelativePath>
152+
<!-- If the tests are built as an .exe use that file. -->
153+
<TestAssemblyRelativePath Condition="Exists('$(OutputPath)$(AssemblyName).exe')">$(OutputPath)$(AssemblyName).exe</TestAssemblyRelativePath>
154154
</PropertyGroup>
155155

156156
<ConvertToAbsolutePath Paths="$(TestAssemblyRelativePath)">

build/common/packages.common.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="xunit.runner.console" version="2.3.0" targetFramework="net46" />
3+
<package id="xunit.runner.console" version="2.3.1" targetFramework="net46" />
44
</packages>

test/Sleet.Azure.Tests/Sleet.Azure.Tests.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
</PropertyGroup>
1111

1212
<PropertyGroup>
13-
<OutputType>Exe</OutputType>
1413
<TestProject>true</TestProject>
1514
</PropertyGroup>
1615

test/Sleet.CliTool.Tests/Sleet.CliTool.Tests.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
</PropertyGroup>
1111

1212
<PropertyGroup>
13-
<OutputType>Exe</OutputType>
1413
<TestProject>true</TestProject>
1514
</PropertyGroup>
1615

test/Sleet.CmdExe.Tests/Sleet.CmdExe.Tests.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
</ItemGroup>
1616

1717
<PropertyGroup>
18-
<OutputType>Exe</OutputType>
1918
<TestProject>true</TestProject>
2019
</PropertyGroup>
2120

test/Sleet.Integration.Tests/Sleet.Integration.Tests.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
</ItemGroup>
1616

1717
<PropertyGroup>
18-
<OutputType>Exe</OutputType>
1918
<TestProject>true</TestProject>
2019
</PropertyGroup>
2120

test/SleetLib.Tests/SleetLib.Tests.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
</ItemGroup>
1616

1717
<PropertyGroup>
18-
<OutputType>Exe</OutputType>
1918
<TestProject>true</TestProject>
2019
</PropertyGroup>
2120

0 commit comments

Comments
 (0)