Skip to content

Commit 96f11ad

Browse files
authored
Merge pull request #116 from progaudi/migrate/netstandard2.0
Migrate/netstandard2.0
2 parents eda7d85 + e7080db commit 96f11ad

File tree

21 files changed

+171
-94
lines changed

21 files changed

+171
-94
lines changed

.travis.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,20 @@ matrix:
33
- os: linux # Ubuntu 14.04
44
dist: trusty
55
sudo: required
6-
- os: linux # Ubuntu 14.04
7-
dist: trusty
8-
env: BUILD_DOCKER=true
96
- os: osx # OSX 10.12
107
osx_image: xcode8.3
118

129
before_install:
13-
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$BUILD_DOCKER" != true ]]; then sudo ./scripts/ubuntu-prereqs.sh ; fi
10+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo ./scripts/ubuntu-prereqs.sh ; fi
1411
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./scripts/mac-prereqs.sh ; fi
1512

1613
install:
17-
- if [[ "$BUILD_DOCKER" != true ]]; then ./scripts/dotnet-install.sh ; fi
18-
- if [[ "$BUILD_DOCKER" != true ]]; then PATH=$PATH:$HOME/.dotnet && export PATH ; fi
14+
- ./scripts/dotnet-install.sh
15+
- PATH=$PATH:$HOME/.dotnet && export PATH
1916
- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then docker-compose -f docker-compose.yml up -d ; fi
2017
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then tarantool tarantool/tarantool.lua ; fi
2118
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then redis-server --daemonize yes ; fi
2219

2320
script:
24-
- if [[ "$BUILD_DOCKER" != true ]]; then ./scripts/build-netcore.sh ; fi
25-
- if [[ "$BUILD_DOCKER" != true ]]; then ./scripts/test-netcore.sh ; fi
26-
- if [[ "$BUILD_DOCKER" == true ]]; then docker-compose -f docker-compose.yml -f docker-compose.tests.yml up --build tarantool-client ; fi
21+
- ./scripts/build-netcore.sh
22+
- ./scripts/test-netcore.sh

appveyor.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "1.0.0"
3+
"version": "2.0.0"
44
}
55
}

progaudi.tarantool.sln

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26228.9
4+
VisualStudioVersion = 15.0.26730.12
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "progaudi.tarantool", "src\progaudi.tarantool\progaudi.tarantool.csproj", "{DD007E9F-FB2D-4351-AAB7-F2D367B295C4}"
77
EndProject
88
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "progaudi.tarantool.tests", "tests\progaudi.tarantool.tests\progaudi.tarantool.tests.csproj", "{4C681801-9A6B-4CE9-8EAA-23F80917F046}"
99
EndProject
10+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{14BAEDF1-BEFC-4FB2-AAC9-08D397191216}"
11+
ProjectSection(SolutionItems) = preProject
12+
global.json = global.json
13+
EndProjectSection
14+
EndProject
15+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "progaudi.tarantool.benchmark", "src\progaudi.tarantool.benchmark\progaudi.tarantool.benchmark.csproj", "{CD96AC2D-505F-4FDF-82FB-76F51CC28FF4}"
16+
EndProject
1017
Global
1118
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1219
Debug|Any CPU = Debug|Any CPU
@@ -41,8 +48,23 @@ Global
4148
{4C681801-9A6B-4CE9-8EAA-23F80917F046}.Release|x64.Build.0 = Release|Any CPU
4249
{4C681801-9A6B-4CE9-8EAA-23F80917F046}.Release|x86.ActiveCfg = Release|Any CPU
4350
{4C681801-9A6B-4CE9-8EAA-23F80917F046}.Release|x86.Build.0 = Release|Any CPU
51+
{CD96AC2D-505F-4FDF-82FB-76F51CC28FF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
52+
{CD96AC2D-505F-4FDF-82FB-76F51CC28FF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
53+
{CD96AC2D-505F-4FDF-82FB-76F51CC28FF4}.Debug|x64.ActiveCfg = Debug|Any CPU
54+
{CD96AC2D-505F-4FDF-82FB-76F51CC28FF4}.Debug|x64.Build.0 = Debug|Any CPU
55+
{CD96AC2D-505F-4FDF-82FB-76F51CC28FF4}.Debug|x86.ActiveCfg = Debug|Any CPU
56+
{CD96AC2D-505F-4FDF-82FB-76F51CC28FF4}.Debug|x86.Build.0 = Debug|Any CPU
57+
{CD96AC2D-505F-4FDF-82FB-76F51CC28FF4}.Release|Any CPU.ActiveCfg = Release|Any CPU
58+
{CD96AC2D-505F-4FDF-82FB-76F51CC28FF4}.Release|Any CPU.Build.0 = Release|Any CPU
59+
{CD96AC2D-505F-4FDF-82FB-76F51CC28FF4}.Release|x64.ActiveCfg = Release|Any CPU
60+
{CD96AC2D-505F-4FDF-82FB-76F51CC28FF4}.Release|x64.Build.0 = Release|Any CPU
61+
{CD96AC2D-505F-4FDF-82FB-76F51CC28FF4}.Release|x86.ActiveCfg = Release|Any CPU
62+
{CD96AC2D-505F-4FDF-82FB-76F51CC28FF4}.Release|x86.Build.0 = Release|Any CPU
4463
EndGlobalSection
4564
GlobalSection(SolutionProperties) = preSolution
4665
HideSolutionNode = FALSE
4766
EndGlobalSection
67+
GlobalSection(ExtensibilityGlobals) = postSolution
68+
SolutionGuid = {ADF03192-56BA-4020-9654-59533D08C629}
69+
EndGlobalSection
4870
EndGlobal
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
FROM progaudi/dotnet:1.0.1-xenial
1+
FROM microsoft/dotnet:2.0.0-sdk
22

33
WORKDIR /app
44
ADD dotnet.csproj /app/dotnet.csproj
5-
RUN /root/.dotnet/dotnet restore
5+
RUN dotnet restore
66

77
ADD . /app
8-
RUN /root/.dotnet/dotnet build -c Release -f netcoreapp1.1 /app/dotnet.csproj
8+
RUN dotnet build -c Release -f netcoreapp2.0 /app/dotnet.csproj
99

1010
EXPOSE 5000/tcp
1111

12-
CMD ["/root/.dotnet/dotnet", "run", "--server.urls", "http://*:5000"]
12+
CMD ["dotnet", "run", "--server.urls", "http://*:5000"]

samples/docker-compose/dotnet/Program.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System.IO;
1+
using Microsoft.AspNetCore;
22
using Microsoft.AspNetCore.Hosting;
33
using Microsoft.Extensions.Configuration;
44

@@ -10,13 +10,12 @@ public static void Main(string[] args)
1010
{
1111
var config = new ConfigurationBuilder()
1212
.AddCommandLine(args)
13-
.AddEnvironmentVariables(prefix: "ASPNETCORE_")
13+
.AddEnvironmentVariables("ASPNETCORE_")
1414
.Build();
1515

16-
var host = new WebHostBuilder()
16+
var host = WebHost
17+
.CreateDefaultBuilder(args)
1718
.UseConfiguration(config)
18-
.UseKestrel()
19-
.UseContentRoot(Directory.GetCurrentDirectory())
2019
.UseStartup<Startup>()
2120
.Build();
2221

samples/docker-compose/dotnet/Views/Home/DogTablePartial.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</tbody>
2525
<tfoot>
2626
<tr>
27-
<td colspan="3">@Model.Dogs.Count dogs total</td>
27+
<td colspan="4">@Model.Dogs.Count dogs total</td>
2828
</tr>
2929
</tfoot>
3030
</table>

samples/docker-compose/dotnet/Views/Home/Index.cshtml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
ViewData["Title"] = "Tarantool demo page";
55
}
66

7+
<h1>Render time is @DateTimeOffset.Now.ToString("F")</h1>
8+
79
@Html.Partial("DogTablePartial", new DogTable(Model[0], "All dogs in Tarantool"))
810

911
@Html.Partial("DogTablePartial", new DogTable(Model[1], "Senior dogs in Tarantool"))
Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
1-
<Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
22
<PropertyGroup>
3-
<OutputType>Exe</OutputType>
4-
<TargetFramework>netcoreapp1.1</TargetFramework>
5-
<PreserveCompilationContext>true</PreserveCompilationContext>
3+
<TargetFramework>netcoreapp2.0</TargetFramework>
64
</PropertyGroup>
75
<ItemGroup>
8-
<Folder Include="wwwroot\" />
6+
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
7+
<PackageReference Include="progaudi.tarantool" Version="0.9.0" />
98
</ItemGroup>
109
<ItemGroup>
11-
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.0" />
12-
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.0" />
13-
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="1.1.0" />
14-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.0" />
15-
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.0" />
16-
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="1.1.0" />
17-
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.1.0" />
18-
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.0" />
19-
<PackageReference Include="msgpack.light" Version="1.3.0" />
20-
<PackageReference Include="progaudi.tarantool" Version="0.8.0" />
10+
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
2111
</ItemGroup>
22-
</Project>
12+
</Project>

scripts/build-netcore.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ cd ..
88

99
dotnet restore
1010
dotnet build -c Release -f netstandard1.4 src/progaudi.tarantool/progaudi.tarantool.csproj
11+
dotnet build -c Release -f netstandard2.0 src/progaudi.tarantool/progaudi.tarantool.csproj
1112
dotnet build -c Release -f netcoreapp1.0 tests/progaudi.tarantool.tests/progaudi.tarantool.tests.csproj
1213
dotnet build -c Release -f netcoreapp1.1 tests/progaudi.tarantool.tests/progaudi.tarantool.tests.csproj
14+
dotnet build -c Release -f netcoreapp2.0 tests/progaudi.tarantool.tests/progaudi.tarantool.tests.csproj
1315

1416
popd

0 commit comments

Comments
 (0)