Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to .NET Core SDK 2.0 #5

Merged
merged 1 commit into from
Aug 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions appveyor.yml → .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
init:
- git config --global core.autocrlf true
build_script:
- build.cmd --quiet verify
- ps: .\build.ps1
clone_depth: 1
test: off
deploy: off
environment:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
os: Visual Studio 2017
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
artifacts/
.vs/
debugSettings.json
project.lock.json
*.user
*.suo
nuget.exe
Expand Down
25 changes: 7 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,16 @@
language: csharp
sudo: required
mono: none
dotnet: 2.0.0
dist: trusty
addons:
apt:
packages:
- gettext
- libcurl4-openssl-dev
- libicu-dev
- libssl-dev
- libunwind8
- zlib1g
env:
global:
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
mono:
- 4.0.5
os:
- linux
#- osx
#osx_image: xcode7.1
#before_install:
# - if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl; ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/; fi
- osx
osx_image: xcode8.2
before_script:
- chmod +x ./build.sh
script:
- ./build.sh --quiet verify

- ./build.sh
30 changes: 20 additions & 10 deletions Jwt.NET.sln
Original file line number Diff line number Diff line change
@@ -1,33 +1,43 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
# Visual Studio 15
VisualStudioVersion = 15.0.26114.2
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{27CE9B86-3C2B-4DC5-A4A4-9B7CE5B19FD1}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{EB12BB02-C15C-469F-B4A4-6DE0E187C8DB}"
ProjectSection(SolutionItems) = preProject
global.json = global.json
NuGet.Config = NuGet.Config
EndProjectSection
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "JsonWebTokens", "src\JsonWebTokens\JsonWebTokens.xproj", "{BCDB458E-A10B-425D-81D1-A78930978394}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JsonWebTokens", "src\JsonWebTokens\JsonWebTokens.csproj", "{8AE68C4D-5A71-4B0F-9275-0541E5D388FD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BCDB458E-A10B-425D-81D1-A78930978394}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BCDB458E-A10B-425D-81D1-A78930978394}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BCDB458E-A10B-425D-81D1-A78930978394}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BCDB458E-A10B-425D-81D1-A78930978394}.Release|Any CPU.Build.0 = Release|Any CPU
{8AE68C4D-5A71-4B0F-9275-0541E5D388FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8AE68C4D-5A71-4B0F-9275-0541E5D388FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8AE68C4D-5A71-4B0F-9275-0541E5D388FD}.Debug|x64.ActiveCfg = Debug|x64
{8AE68C4D-5A71-4B0F-9275-0541E5D388FD}.Debug|x64.Build.0 = Debug|x64
{8AE68C4D-5A71-4B0F-9275-0541E5D388FD}.Debug|x86.ActiveCfg = Debug|x86
{8AE68C4D-5A71-4B0F-9275-0541E5D388FD}.Debug|x86.Build.0 = Debug|x86
{8AE68C4D-5A71-4B0F-9275-0541E5D388FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8AE68C4D-5A71-4B0F-9275-0541E5D388FD}.Release|Any CPU.Build.0 = Release|Any CPU
{8AE68C4D-5A71-4B0F-9275-0541E5D388FD}.Release|x64.ActiveCfg = Release|x64
{8AE68C4D-5A71-4B0F-9275-0541E5D388FD}.Release|x64.Build.0 = Release|x64
{8AE68C4D-5A71-4B0F-9275-0541E5D388FD}.Release|x86.ActiveCfg = Release|x86
{8AE68C4D-5A71-4B0F-9275-0541E5D388FD}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{BCDB458E-A10B-425D-81D1-A78930978394} = {27CE9B86-3C2B-4DC5-A4A4-9B7CE5B19FD1}
{8AE68C4D-5A71-4B0F-9275-0541E5D388FD} = {27CE9B86-3C2B-4DC5-A4A4-9B7CE5B19FD1}
EndGlobalSection
EndGlobal
68 changes: 1 addition & 67 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,67 +1 @@
$ErrorActionPreference = "Stop"

function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $retries)
{
while($true)
{
try
{
Invoke-WebRequest $url -OutFile $downloadLocation
break
}
catch
{
$exceptionMessage = $_.Exception.Message
Write-Host "Failed to download '$url': $exceptionMessage"
if ($retries -gt 0) {
$retries--
Write-Host "Waiting 10 seconds before retrying. Retries left: $retries"
Start-Sleep -Seconds 10

}
else
{
$exception = $_.Exception
throw $exception
}
}
}
}

cd $PSScriptRoot

$repoFolder = $PSScriptRoot
$env:REPO_FOLDER = $repoFolder

$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/1.0.0.zip"
if ($env:KOREBUILD_ZIP)
{
$koreBuildZip=$env:KOREBUILD_ZIP
}

$buildFolder = ".build"
$buildFile="$buildFolder\KoreBuild.ps1"

if (!(Test-Path $buildFolder)) {
Write-Host "Downloading KoreBuild from $koreBuildZip"

$tempFolder=$env:TEMP + "\KoreBuild-" + [guid]::NewGuid()
New-Item -Path "$tempFolder" -Type directory | Out-Null

$localZipFile="$tempFolder\korebuild.zip"

DownloadWithRetry -url $koreBuildZip -downloadLocation $localZipFile -retries 6

Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory($localZipFile, $tempFolder)

New-Item -Path "$buildFolder" -Type directory | Out-Null
copy-item "$tempFolder\**\build\*" $buildFolder -Recurse

# Cleanup
if (Test-Path $tempFolder) {
Remove-Item -Recurse -Force $tempFolder
}
}

&"$buildFile" $args
dotnet build
47 changes: 1 addition & 46 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,46 +1 @@
#!/usr/bin/env bash
repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $repoFolder

koreBuildZip="https://github.com/aspnet/KoreBuild/archive/1.0.0.zip"
if [ ! -z $KOREBUILD_ZIP ]; then
koreBuildZip=$KOREBUILD_ZIP
fi

buildFolder=".build"
buildFile="$buildFolder/KoreBuild.sh"

if test ! -d $buildFolder; then
echo "Downloading KoreBuild from $koreBuildZip"

tempFolder="/tmp/KoreBuild-$(uuidgen)"
mkdir $tempFolder

localZipFile="$tempFolder/korebuild.zip"

retries=6
until (wget -O $localZipFile $koreBuildZip 2>/dev/null || curl -o $localZipFile --location $koreBuildZip 2>/dev/null)
do
echo "Failed to download '$koreBuildZip'"
if [ "$retries" -le 0 ]; then
exit 1
fi
retries=$((retries - 1))
echo "Waiting 10 seconds before retrying. Retries left: $retries"
sleep 10s
done

unzip -q -d $tempFolder $localZipFile

mkdir $buildFolder
cp -r $tempFolder/**/build/** $buildFolder

chmod +x $buildFile

# Cleanup
if test ! -d $tempFolder; then
rm -rf $tempFolder
fi
fi

$buildFile -r $repoFolder "$@"
dotnet build
3 changes: 0 additions & 3 deletions global.json

This file was deleted.

20 changes: 20 additions & 0 deletions src/JsonWebTokens/JsonWebTokens.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>JSON Web Tokens implementation for .NET Core.</Description>
<Copyright>Copyright 2017 Henk Mollema</Copyright>
<VersionPrefix>2.0.0</VersionPrefix>
<Authors>Henk Mollema</Authors>
<TargetFrameworks>netstandard1.3</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>JsonWebTokens</AssemblyName>
<PackageId>JsonWebTokens</PackageId>
<PackageTags>jwt;tokens;jsonwebtoken;.net;net;core</PackageTags>
<PackageProjectUrl>https://github.com/henkmollema/Jwt.NET</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/henkmollema/Jwt.NET/blob/master/LICENSE</PackageLicenseUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>git://github.com/henkmollema/Jwt.NET</RepositoryUrl>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
</ItemGroup>
</Project>
18 changes: 0 additions & 18 deletions src/JsonWebTokens/JsonWebTokens.xproj

This file was deleted.

31 changes: 0 additions & 31 deletions src/JsonWebTokens/project.json

This file was deleted.