-
-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extracted Models to separate package. Upgraded to netcoreapp2.2. (#103)
* Moved Models and Public classes to Fido2NetLib.Models project * Allow arguments to buildRelease.ps1 * Conditionally use nuget package when in release mode * Added version information * removed old dashboard * Fixed broken package name * Added buildscripts and bumped versions * Changed to published nuget package * Change foldername to Models * Added Models to buildRelease script so that CI can test it * Fixed some issues with moving the project * Prefix Configuration and User with Fido2 to create less naming conflicts and confusion between domain models * Bumped version * Added run-all build script * Bumped version dependency * Released preview7 * Shuffled around props to reduce complexity and increase flexibility Also fixed the documentation URL in the net46x warning Suppressed warnings in sourced libs Globalized supported targetframeworks as well as version variables etc. * Fixed buildscripts * Fixed buildWarnings/Errors * Upgraded to netcoreapp2.2 and removed JWT from Demo
- Loading branch information
Showing
73 changed files
with
790 additions
and
696 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<Project> | ||
<!-- Package Metadata --> | ||
<PropertyGroup> | ||
<VersionPrefix>1.0.0</VersionPrefix> | ||
<VersionSuffix>preview8-dev</VersionSuffix> | ||
<Description>FIDO2 .NET library (WebAuthn)</Description> | ||
<RepositoryUrl>https://github.com/abergs/fido2-net-lib</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<PackageTags>fido2 webauthn</PackageTags> | ||
<PackageReleaseNotes>Initial release</PackageReleaseNotes> | ||
<PackageProjectUrl>https://github.com/abergs/fido2-net-lib</PackageProjectUrl> | ||
<PackageLicenseUrl>https://github.com/abergs/fido2-net-lib/blob/master/LICENSE.txt</PackageLicenseUrl> | ||
</PropertyGroup> | ||
<!-- GLOBALLY USABLE VARIABLES --> | ||
<PropertyGroup> | ||
<!-- Establish a preset but make it an active choice for each project. --> | ||
<SupportedNonMetaTargetFrameWorks>netcoreapp2.2</SupportedNonMetaTargetFrameWorks> | ||
<!-- Can't have test project target .netstandard - only implementations not metaframeworks --> | ||
<SupportedTargetFrameworks>netstandard2.0;$(SupportedNonMetaTargetFrameWorks)</SupportedTargetFrameworks> | ||
</PropertyGroup> | ||
<!-- Language + Compiler Settings--> | ||
<PropertyGroup> | ||
<!-- Pin down language version --> | ||
<LangVersion>7.3</LangVersion> | ||
<!-- Running with "latest" means time alone will make builds non-reproducable... aww hell na --> | ||
</PropertyGroup> | ||
<!--MISC--> | ||
<PropertyGroup> | ||
<!-- Avoid annoying build warnings when packing using the solution file --> | ||
<IsPackable>false</IsPackable> | ||
<!-- Avoid annoying build warnings when packing using the solution file --> | ||
<IsTestProject>false</IsTestProject> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
$scriptDir = Split-Path $myinvocation.mycommand.path -Parent | ||
$root = Split-Path $scriptDir -Parent | ||
$target = Join-Path $root "Src" | Join-Path -ChildPath "Fido2NetLib.csproj" | ||
$target = Join-Path $root "fido2-net-lib.sln" | ||
Write-Host "Building $target" | ||
dotnet build -c Release $target | ||
dotnet build -c Release $target $args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
$scriptDir = Split-Path $myinvocation.mycommand.path -Parent | ||
$root = Split-Path $scriptDir -Parent | ||
$target = Join-Path $root "Src" | Join-Path -ChildPath "Fido2NetLib.csproj" | ||
Write-Host "Packing $target" | ||
dotnet pack -c Release $target | ||
$target = Join-Path $root "fido2-net-lib.sln" | ||
Write-Host "Building $target" | ||
dotnet pack -c Release $target $args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
param([String]$nupkgPath="") #Must be the first statement in your script | ||
param( | ||
[Parameter(Mandatory=$true)] | ||
[System.IO.FileInfo] | ||
[String] $path) #Must be the first statement in your script | ||
|
||
$scriptDir = Split-Path $myinvocation.mycommand.path -Parent | ||
$root = Split-Path $scriptDir -Parent | ||
$target = Join-Path $root "Src" | Join-Path -ChildPath "bin" | Join-Path -ChildPath "release" | ||
# if ($nupkgPath -eq "") { | ||
# $scriptDir = Split-Path $myinvocation.mycommand.path -Parent | ||
# $root = Split-Path $scriptDir -Parent | ||
# $target = Join-Path $root "Src" | Join-Path -ChildPath "bin" | Join-Path -ChildPath "release" | ||
|
||
# Write-Error "No nupkg path supplied" | ||
# Write-Host "nupkgs found in release folder $target\:" | ||
# $files = Get-ChildItem $target -Filter *.nupkg | ||
# Write-Host $files | ||
# exit 1 | ||
# } | ||
|
||
if ($nupkgPath -eq "") { | ||
Write-Error "No nupkg path supplied" | ||
Write-Host "nupkgs found in release folder $target\:" | ||
$files = Get-ChildItem $target -Filter *.nupkg | ||
Write-Host $files | ||
exit 1 | ||
} | ||
$path2 = $path; | ||
|
||
Write-Host "Publishing $nupkgPath..." | ||
$path = Resolve-Path $path | ||
if($path2 -ne $path) { | ||
Write-Host "Resolved $path2 -> $path" | ||
} | ||
Write-Host "Publishing $path..." | ||
Start-Sleep 2 | ||
dotnet nuget push $nupkgPath --source https://api.nuget.org/v3/index.json | ||
dotnet nuget push $path --source https://api.nuget.org/v3/index.json | ||
|
||
Write-Host "Done $path..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
param([String]$VersionPrefix="1.0.0", [String]$VersionSuffix="") #Must be the first statement in your script | ||
|
||
$scriptDir = Split-Path $myinvocation.mycommand.path -Parent | ||
$root = Split-Path $scriptDir -Parent | ||
|
||
## Prefix the suffix with a dash if set. | ||
if($VersionSuffix) { | ||
$VersionSuffixPath = "-" + $VersionSuffix | ||
} | ||
|
||
# Check for confirmation | ||
Write-Host "This will call setVersion, pack and publish both projects to nuget." | ||
Write-Host -background yellow -foreground black "Version: $VersionPrefix$VersionSuffixPath" | ||
$confirmation = Read-Host "Are you Sure You Want To Proceed [y]" | ||
if ($confirmation -ne 'y') {exit} | ||
|
||
# proceed | ||
& (join-path $scriptDir "setVersion.ps1") -VersionPrefix $VersionPrefix -VersionSuffix $VersionSuffix | ||
& (join-path $scriptDir "buildRelease.ps1") | ||
#& (join-path $scriptDir "packRelease.ps1") | ||
|
||
if ($? -eq $false) { | ||
write-host -background DarkBlue -foreground Red "<Error Exit>" | ||
exit 1 | ||
} | ||
|
||
$target1 = Join-Path $root "Src\Fido2\bin\Release\Fido2.$VersionPrefix$VersionSuffixPath.nupkg" | ||
$target2 = Join-Path $root "Src\Fido2.Models\bin\Release\Fido2.Models.$VersionPrefix$VersionSuffixPath.nupkg" | ||
|
||
if ( | ||
((Test-Path $target1) -eq $false) -Or ((Test-Path $target2) -eq $false)) { | ||
write-host -background DarkBlue -foreground Red "Could not locate nupkg" | ||
Write-Host "Path1 $target1" | ||
Write-Host "Path2 $target2" | ||
|
||
exit 1 | ||
} | ||
|
||
Write-Host "Ready to publish $target1" | ||
Write-Host "Ready to publish $target2" | ||
Write-Host -background yellow -foreground black "Version: $VersionPrefix$VersionSuffixPath" | ||
|
||
$confirmation = Read-Host "Are you Sure You Want To Proceed (y)" | ||
if ($confirmation -ne 'y') {exit} | ||
& (join-path $scriptDir "publish.ps1") -path $target2 | ||
& (join-path $scriptDir "publish.ps1") -path $target1 | ||
|
||
|
||
Write-Host "Done. Update to $VersionPrefix $VersionSuffix and published to nuget." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
param([String]$VersionPrefix="1.0.0", [String]$VersionSuffix="") #Must be the first statement in your script | ||
|
||
$scriptDir = Split-Path $myinvocation.mycommand.path -Parent | ||
$root = Split-Path $scriptDir -Parent | ||
|
||
$target1 = Join-Path $root "Directory.Build.props" | ||
|
||
Write-Host "Changing $target1" | ||
$filePathToTask = $target1 | ||
$xml = New-Object XML | ||
$xml.Load($filePathToTask) | ||
$element = $xml.SelectSingleNode("//VersionPrefix") | ||
$element.InnerText = $VersionPrefix | ||
$element = $xml.SelectSingleNode("//VersionSuffix") | ||
$element.InnerText = $VersionSuffix | ||
$xml.Save($filePathToTask) | ||
|
||
Write-Host "Updated to version $VersionPrefix $VersionSuffix" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<Project> | ||
<Import Project="..\Directory.Build.props"/> | ||
|
||
<!-- SourceLink Support--> | ||
<PropertyGroup> | ||
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder> | ||
<PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-63127-02" PrivateAssets="All" /> | ||
</ItemGroup> | ||
|
||
<!-- Projects inside "./src" should generate packages --> | ||
<PropertyGroup> | ||
<IsPackable>true</IsPackable> | ||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
</PropertyGroup> | ||
</Project> |
Oops, something went wrong.