Skip to content

Commit 1003dff

Browse files
Merge pull request #47 from martincostello/AspNet-Core-3
Update to ASP.NET Core 3.0
2 parents 8b46a86 + 68574e7 commit 1003dff

28 files changed

+493
-83
lines changed

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
sudo: required
22
dist: xenial
3+
language: csharp
4+
mono: none
35

46
os:
57
- linux
@@ -22,10 +24,11 @@ addons:
2224
- libicu-dev
2325
- libssl-dev
2426
- libunwind8
27+
chrome: stable
2528

2629
install:
27-
- npm install -g bower
28-
- npm install -g npm
30+
- npm install --global bower
31+
- npm install --global npm
2932

3033
script:
3134
- ./build.sh

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": "coreclr",
77
"request": "launch",
88
"preLaunchTask": "build",
9-
"program": "${workspaceRoot}/src/ApplePayJS/bin/Debug/netcoreapp2.2/JustEat.ApplePayJS.dll",
9+
"program": "${workspaceRoot}/src/ApplePayJS/bin/Debug/netcoreapp3.0/JustEat.ApplePayJS.dll",
1010
"args": [],
1111
"cwd": "${workspaceRoot}/src/ApplePayJS",
1212
"stopAtEntry": false,

ApplePayJS.sln

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1414
Build.ps1 = Build.ps1
1515
build.sh = build.sh
1616
CODE_OF_CONDUCT.md = CODE_OF_CONDUCT.md
17+
Directory.Build.props = Directory.Build.props
1718
global.json = global.json
1819
LICENSE = LICENSE
1920
NuGet.config = NuGet.config
@@ -29,6 +30,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{A4EF
2930
.github\PULL_REQUEST_TEMPLATE.md = .github\PULL_REQUEST_TEMPLATE.md
3031
EndProjectSection
3132
EndProject
33+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".vscode", ".vscode", "{F99C01C5-8B5D-4BDD-B40B-35DE14D08D57}"
34+
ProjectSection(SolutionItems) = preProject
35+
.vscode\launch.json = .vscode\launch.json
36+
.vscode\tasks.json = .vscode\tasks.json
37+
EndProjectSection
38+
EndProject
39+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{3F1B1211-EEF9-482B-93CD-6FF250907EB9}"
40+
EndProject
41+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApplePayJS.Tests", "tests\ApplePayJS.Tests\ApplePayJS.Tests.csproj", "{20EE5C1E-2059-4291-93F6-AA0F76C08EBE}"
42+
EndProject
3243
Global
3344
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3445
Debug|Any CPU = Debug|Any CPU
@@ -39,13 +50,19 @@ Global
3950
{4CFD067B-FD1A-4303-9322-3138E9104B1F}.Debug|Any CPU.Build.0 = Debug|Any CPU
4051
{4CFD067B-FD1A-4303-9322-3138E9104B1F}.Release|Any CPU.ActiveCfg = Release|Any CPU
4152
{4CFD067B-FD1A-4303-9322-3138E9104B1F}.Release|Any CPU.Build.0 = Release|Any CPU
53+
{20EE5C1E-2059-4291-93F6-AA0F76C08EBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
54+
{20EE5C1E-2059-4291-93F6-AA0F76C08EBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
55+
{20EE5C1E-2059-4291-93F6-AA0F76C08EBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
56+
{20EE5C1E-2059-4291-93F6-AA0F76C08EBE}.Release|Any CPU.Build.0 = Release|Any CPU
4257
EndGlobalSection
4358
GlobalSection(SolutionProperties) = preSolution
4459
HideSolutionNode = FALSE
4560
EndGlobalSection
4661
GlobalSection(NestedProjects) = preSolution
4762
{4CFD067B-FD1A-4303-9322-3138E9104B1F} = {ABF2B260-1BAE-45CD-9348-C163CA02ECA3}
4863
{A4EFB4F4-BC05-4A67-89AC-4D7D21B71D4E} = {C697BCC9-C4F9-4AD8-8336-E90A239865DE}
64+
{F99C01C5-8B5D-4BDD-B40B-35DE14D08D57} = {C697BCC9-C4F9-4AD8-8336-E90A239865DE}
65+
{20EE5C1E-2059-4291-93F6-AA0F76C08EBE} = {3F1B1211-EEF9-482B-93CD-6FF250907EB9}
4966
EndGlobalSection
5067
GlobalSection(ExtensibilityGlobals) = postSolution
5168
SolutionGuid = {8797D09A-407D-424A-A8F0-22FB26F0650C}

Build.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ else {
5858
Write-Host "Publishing solution..." -ForegroundColor Green
5959
& $dotnet publish $solutionFile --output $OutputPath --configuration $Configuration
6060

61+
Write-Host "Running tests..." -ForegroundColor Green
62+
& $dotnet test $solutionFile --output $OutputPath --configuration $Configuration
63+
6164
if ($LASTEXITCODE -ne 0) {
6265
throw "dotnet publish failed with exit code $LASTEXITCODE"
6366
}

Directory.Build.props

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<Project>
2+
<PropertyGroup>
3+
<Authors>Martin Costello</Authors>
4+
<Company>Just Eat</Company>
5+
<Copyright>Just Eat (c) 2016-$([System.DateTime]::Now.ToString(yyyy))</Copyright>
6+
<LangVersion>latest</LangVersion>
7+
<NeutralLanguage>en-US</NeutralLanguage>
8+
<Nullable>enable</Nullable>
9+
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
10+
<PackageProjectUrl>https://github.com/justeat/ApplePayJSSample</PackageProjectUrl>
11+
<PackageReleaseNotes>$(PackageProjectUrl)/releases</PackageReleaseNotes>
12+
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
13+
<PackageTags>applepay</PackageTags>
14+
<RepositoryType>git</RepositoryType>
15+
<RepositoryUrl>$(PackageProjectUrl).git</RepositoryUrl>
16+
<TypeScriptToolsVersion>latest</TypeScriptToolsVersion>
17+
<VersionPrefix>3.0.0</VersionPrefix>
18+
<VersionSuffix></VersionSuffix>
19+
</PropertyGroup>
20+
</Project>

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
|:-:|:-:|:-:|
66
| **Build Status** | [![Build status](https://img.shields.io/travis/justeat/ApplePayJSSample/master.svg)](https://travis-ci.org/justeat/ApplePayJSSample) | [![Build status](https://img.shields.io/appveyor/ci/justeattech/applepayjssample/master.svg)](https://ci.appveyor.com/project/justeattech/applepayjssample) |
77

8-
This repository contains a sample implementation of [Apple Pay JS](https://developer.apple.com/reference/applepayjs/) using ASP.NET Core 2.2 written in C# and JavaScript.
8+
This repository contains a sample implementation of [Apple Pay JS](https://developer.apple.com/reference/applepayjs/) using ASP.NET Core 3.0 written in C# and JavaScript.
99

1010
## Overview
1111

@@ -24,7 +24,7 @@ The key components to look at for the implementation are:
2424

2525
To setup the repository to run the sample, perform the steps below:
2626

27-
1. Install the [.NET Core 2.2.402 SDK](https://www.microsoft.com/net/download/core), Visual Studio 2019 or Visual Studio Code.
27+
1. Install the [.NET Core 3.0.100 SDK](https://www.microsoft.com/net/download/core), Visual Studio 2019 or Visual Studio Code.
2828
1. Fork this repository.
2929
1. Clone the repository from your fork to your local machine: ```git clone https://github.com/{username}/ApplePayJSSample.git```
3030
1. Restore the Bower, npm and NuGet packages.

appveyor.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
os: Visual Studio 2017
1+
os: Visual Studio 2019
22
version: 3.0.{build}
33

44
environment:
@@ -10,8 +10,9 @@ branches:
1010
- master
1111

1212
install:
13-
- ps: npm install -g bower --loglevel=error
14-
- ps: npm install -g npm
13+
- ps: npm install --global bower --loglevel=error
14+
- ps: npm install --global npm
15+
- ps: choco upgrade googlechrome --confirm --ignore-checksums --no-progress
1516

1617
build_script:
1718
- ps: .\Build.ps1

build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ export PATH="$DOTNET_INSTALL_DIR:$PATH"
3131
dotnet_version=$(dotnet --version)
3232

3333
if [ "$dotnet_version" != "$CLI_VERSION" ]; then
34+
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --version "2.2.402" --install-dir "$DOTNET_INSTALL_DIR"
3435
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --version "$CLI_VERSION" --install-dir "$DOTNET_INSTALL_DIR"
3536
fi
3637

3738
dotnet publish ./ApplePayJS.sln --output $artifacts/publish --configuration $configuration || exit 1
39+
dotnet test ./ApplePayJS.sln --output $artifacts --configuration $configuration || exit 1

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": "2.2.402"
3+
"version": "3.0.100"
44
}
55
}

src/ApplePayJS/ApplePayJS.csproj

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,23 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22
<PropertyGroup>
3-
<AspNetCoreHostingModel>inprocess</AspNetCoreHostingModel>
4-
<Authors>Martin Costello</Authors>
3+
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
54
<AssemblyName>JustEat.ApplePayJS</AssemblyName>
6-
<Company>Just Eat</Company>
7-
<Copyright>Just Eat (c) 2016-$([System.DateTime]::Now.ToString(yyyy))</Copyright>
8-
<LangVersion>latest</LangVersion>
9-
<NeutralLanguage>en-US</NeutralLanguage>
105
<OutputType>Exe</OutputType>
11-
<PackageIconUrl>https://avatars3.githubusercontent.com/u/1516790?v=3&amp;s=100</PackageIconUrl>
126
<PackageId>JustEat.ApplePayJS</PackageId>
137
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
148
<PackageProjectUrl>https://github.com/justeat/ApplePayJSSample</PackageProjectUrl>
159
<PackageReleaseNotes>$(PackageProjectUrl)/releases</PackageReleaseNotes>
1610
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
1711
<PackageTags>applepay</PackageTags>
1812
<PreserveCompilationContext>true</PreserveCompilationContext>
19-
<RepositoryType>git</RepositoryType>
20-
<RepositoryUrl>$(PackageProjectUrl).git</RepositoryUrl>
2113
<RootNamespace>JustEat.ApplePayJS</RootNamespace>
22-
<TargetFramework>netcoreapp2.2</TargetFramework>
14+
<TargetFramework>netcoreapp3.0</TargetFramework>
2315
<TypeScriptToolsVersion>latest</TypeScriptToolsVersion>
2416
<UserSecretsId>JustEat.ApplePayJS</UserSecretsId>
25-
<VersionPrefix>3.0.0</VersionPrefix>
26-
<VersionSuffix></VersionSuffix>
2717
</PropertyGroup>
2818
<ItemGroup>
2919
<Content Update="*.pfx" CopyToPublishDirectory="PreserveNewest" />
3020
</ItemGroup>
31-
<ItemGroup>
32-
<PackageReference Include="Microsoft.AspNetCore.App" />
33-
</ItemGroup>
3421
<PropertyGroup Condition=" '$(InstallWebPackages)' == '' and ('$(CI)' != '' or !Exists('$(MSBuildThisFileDirectory)\node_modules')) ">
3522
<InstallWebPackages>true</InstallWebPackages>
3623
</PropertyGroup>
@@ -50,6 +37,6 @@
5037
</ItemGroup>
5138
</Target>
5239
<ItemGroup>
53-
<DotNetCliToolReference Include="BundlerMinifier.Core" Version="2.8.391" />
40+
<DotNetCliToolReference Include="BundlerMinifier.Core" Version="3.0.415" />
5441
</ItemGroup>
5542
</Project>

0 commit comments

Comments
 (0)