diff --git a/appveyor.yml b/.appveyor.yml similarity index 67% rename from appveyor.yml rename to .appveyor.yml index dec7b84..aa0a0e5 100644 --- a/appveyor.yml +++ b/.appveyor.yml @@ -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 \ No newline at end of file + DOTNET_CLI_TELEMETRY_OPTOUT: 1 +os: Visual Studio 2017 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 961a753..13e72f6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ artifacts/ .vs/ debugSettings.json -project.lock.json *.user *.suo nuget.exe diff --git a/.travis.yml b/.travis.yml index f44add7..56ae0dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 - \ No newline at end of file + - ./build.sh \ No newline at end of file diff --git a/Jwt.NET.sln b/Jwt.NET.sln index c59dcc0..9d3dd3b 100644 --- a/Jwt.NET.sln +++ b/Jwt.NET.sln @@ -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 diff --git a/build.ps1 b/build.ps1 index 6d49c4d..6b11cb5 100644 --- a/build.ps1 +++ b/build.ps1 @@ -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 \ No newline at end of file +dotnet build diff --git a/build.sh b/build.sh index a55d3eb..6b11cb5 100755 --- a/build.sh +++ b/build.sh @@ -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 "$@" \ No newline at end of file +dotnet build diff --git a/global.json b/global.json deleted file mode 100644 index 7d8f1bf..0000000 --- a/global.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "projects": [ "src" ] -} diff --git a/src/JsonWebTokens/JsonWebTokens.csproj b/src/JsonWebTokens/JsonWebTokens.csproj new file mode 100644 index 0000000..b205494 --- /dev/null +++ b/src/JsonWebTokens/JsonWebTokens.csproj @@ -0,0 +1,20 @@ + + + JSON Web Tokens implementation for .NET Core. + Copyright 2017 Henk Mollema + 2.0.0 + Henk Mollema + netstandard1.3 + true + JsonWebTokens + JsonWebTokens + jwt;tokens;jsonwebtoken;.net;net;core + https://github.com/henkmollema/Jwt.NET + https://github.com/henkmollema/Jwt.NET/blob/master/LICENSE + git + git://github.com/henkmollema/Jwt.NET + + + + + \ No newline at end of file diff --git a/src/JsonWebTokens/JsonWebTokens.xproj b/src/JsonWebTokens/JsonWebTokens.xproj deleted file mode 100644 index 68e673d..0000000 --- a/src/JsonWebTokens/JsonWebTokens.xproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - 14.0.25123 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - bcdb458e-a10b-425d-81d1-a78930978394 - Jwt - .\obj - .\bin\ - - - 2.0 - - - \ No newline at end of file diff --git a/src/JsonWebTokens/project.json b/src/JsonWebTokens/project.json deleted file mode 100644 index 74e3a2b..0000000 --- a/src/JsonWebTokens/project.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "version": "1.3.0", - "title": "JsonWebTokens", - "authors": [ "Henk Mollema" ], - "copyright": "Copyright 2016 Henk Mollema", - "description": "JSON Web Tokens implementation for .NET Core.", - "packOptions": { - "owners": [ "Henk Mollema" ], - "tags": [ "jwt", "tokens", "jsonwebtoken", ".net", "net", "core" ], - "projectUrl": "https://github.com/henkmollema/Jwt.NET", - "licenseUrl": "https://github.com/henkmollema/Jwt.NET/blob/master/LICENSE", - "repository": { - "type": "git", - "url": "git://github.com/henkmollema/Jwt.NET" - } - }, - - "buildOptions": { - "xmlDoc": true - }, - - "dependencies": { - "NETStandard.Library": "1.6.1", - "Newtonsoft.Json": "9.0.1" - }, - - "frameworks": { - "net451": {}, - "netstandard1.3": {} - } -}