Skip to content

Commit

Permalink
Merge pull request #2 from linq2db/versions
Browse files Browse the repository at this point in the history
nugets updated
  • Loading branch information
ili authored May 17, 2017
2 parents 0d68b8a + 38c7799 commit 7c8ad73
Show file tree
Hide file tree
Showing 125 changed files with 7,191 additions and 7,149 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ nuget.exe
project.lock.json
.vs
.build/
.testPublish/
.testPublish/
tools/*
19 changes: 10 additions & 9 deletions LinqToDB.Identity.sln
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.26403.7
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0F647068-6602-4E24-B1DC-8ED91481A50A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{52D59F18-62D2-4D17-8CF2-BE192445AF8E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{58D94A0E-C2B7-43A7-8826-99ECBB1E0A50}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "IdentitySample.Mvc", "samples\IdentitySample.Mvc\IdentitySample.Mvc.xproj", "{E1BFA023-CFFD-49CE-8466-1C28DD2EC1F6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{970CAB07-F853-4712-AA12-BD8961C8E430}"
ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml
build.cmd = build.cmd
build.cake = build.cake
build.ps1 = build.ps1
global.json = global.json
linq2db.snk = linq2db.snk
NuGet.config = NuGet.config
README.md = README.md
EndProjectSection
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test", "test\Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test\Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test.xproj", "{37236EA3-915D-46D5-997C-DF513C500E4B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IdentitySample.Mvc", "samples\IdentitySample.Mvc\IdentitySample.Mvc.csproj", "{E1BFA023-CFFD-49CE-8466-1C28DD2EC1F6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test", "test\Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test\Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test.csproj", "{37236EA3-915D-46D5-997C-DF513C500E4B}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test", "test\Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test\Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test.xproj", "{EA7EB28F-53B8-4009-9C6B-74DB090CA8DD}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test", "test\Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test\Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test.csproj", "{EA7EB28F-53B8-4009-9C6B-74DB090CA8DD}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "LinqToDB.Identity", "src\LinqToDB.Identity\LinqToDB.Identity.xproj", "{4490894C-3572-4E63-86F1-EE5105CE8A06}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LinqToDB.Identity", "src\LinqToDB.Identity\LinqToDB.Identity.csproj", "{4490894C-3572-4E63-86F1-EE5105CE8A06}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
11 changes: 6 additions & 5 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>

<configuration>
<packageSources>
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
<add key="ili" value="https://www.myget.org/F/ili/api/v3/index.json" />
<packageSources>
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
<add key="ili" value="https://www.myget.org/F/ili/api/v3/index.json" />
<add key="AspNetCore" value="https://dotnet.myget.org/F/aspnetcore-ci-release/api/v3/index.json" />
</packageSources>
</configuration>
</configuration>
28 changes: 21 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
[LinqToDB](https://github.com/linq2db/linq2db) Identity store provider for [ASP.NET Core Identity](https://github.com/aspnet/Identity)
===

AppVeyor last build: [![Build status](https://ci.appveyor.com/api/projects/status/x15cyc688w9247oj?svg=true)](https://ci.appveyor.com/project/ili/linqtodb-identity)
* Current build status [![Build status](https://ci.appveyor.com/api/projects/status/2d8k9n1x5ggsuv3f?svg=true)](https://ci.appveyor.com/project/igor-tkachev/linqtodb-identity)
* Master build status [![Build status](https://ci.appveyor.com/api/projects/status/2d8k9n1x5ggsuv3f/branch/master?svg=true)](https://ci.appveyor.com/project/igor-tkachev/linqtodb-identity/branch/master)

AppVeyor master build: [![Build status](https://ci.appveyor.com/api/projects/status/x15cyc688w9247oj/branch/master?svg=true)](https://ci.appveyor.com/project/ili/linqtodb-identity/branch/master)

## NuGet
* [NuGet.org](https://www.nuget.org/packages/LinqToDB.Identity/)
* [MyGet.org](https://www.myget.org/feed/ili/package/nuget/LinqToDB.Identity) feed: https://www.myget.org/F/ili/api/v3/index.json

## Feeds
* Release builds can be found on [NuGet](https://www.nuget.org/packages?q=linq2db)
* [MyGet](https://www.myget.org/gallery/linq2db)
* V2 `https://www.myget.org/F/linq2db/api/v2`
* V3 `https://www.myget.org/F/linq2db/api/v3/index.json`

## Usage
In general this is the same as for Entity Framework, just call `AddLinqToDBStores` instead of `AddEntityFrameworkStores` in your `Startup.cs` like [here](https://github.com/ili/LinqToDB.Identity/blob/master/samples/IdentitySample.Mvc/Startup.cs#L62)
Install package:

`PM> Install-Package linq2db.Identity`

In general this is the same as for Entity Framework, just call `AddLinqToDBStores` instead of `AddEntityFrameworkStores` in your `Startup.cs` like [here](https://github.com/linq2db/LinqToDB.Identity/blob/master/samples/IdentitySample.Mvc/Startup.cs#L62):
```cs
services.AddIdentity<ApplicationUser, IdentityRole>(options => {
options.Cookies.ApplicationCookie.AuthenticationScheme = "ApplicationCookie";
options.Cookies.ApplicationCookie.CookieName = "Interop";
options.Cookies.ApplicationCookie.DataProtectionProvider = DataProtectionProvider.Create(new DirectoryInfo("C:\\Github\\Identity\\artifacts"));
})
.AddLinqToDBStores(new DefaultConnectionFactory<DataContext, ApplicationDataConnection>()) //here
.AddDefaultTokenProviders();
```

The main difference with Entity Framework Core storage provider are:
* We do not use hardcoded classes - interfaces like `IIdentityUser<TKey>` are used (but yes, we do have default implementation)
Expand Down
File renamed without changes.
61 changes: 18 additions & 43 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,46 @@
init:
- git config --global core.autocrlf true

version: 1.1.0.{build}

configuration: Release
- ps: $env:TestSqlServerDefaultConnectionString = "Server=(local)\SQL2012SP1;Database=master;Integrated Security=true"

cache:
- packages -> **\packages.config
- '%USERPROFILE%\.nuget\packages -> **\project.json'

environment:
nugetVersion: 1.1.1

version: $(nugetVersion).{build}

assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
build_script:
- ps: .\build.ps1

test: off

artifacts:
- path: artifacts/packages/*.nupkg

services:
- mssql2012sp1
#- mysql
#- postgresql

before_build:
- cmd: dotnet restore

build:
project: LinqToDB.Identity.sln
verbosity: minimal

after_build:
- cmd: dotnet pack --no-build src/LinqToDB.Identity/project.json --version-suffix=preview1-final -c=Release

before_test:
- ps: |
[Environment]::SetEnvironmentVariable("Test:SqlServer:DefaultConnectionString", "Server=(local)\SQL2012SP1;Database=master;Integrated Security=true", "Machine")
[Environment]::SetEnvironmentVariable("Test:SqlServer:DefaultConnectionString", "Server=(local)\SQL2012SP1;Database=master;Integrated Security=true")
test_script:
- ps: |
Write-Host "Connection string"
Write-Host $([Environment]::GetEnvironmentVariable("Test:SqlServer:DefaultConnectionString"))
dotnet test test\Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test -c Release -f netcoreapp1.0
$test1res = $LASTEXITCODE
# upload results to AppVeyor
#$wc = New-Object 'System.Net.WebClient'
#$wc.UploadFile("https://ci.appveyor.com/api/testresults/xunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\TestResult.xml))
dotnet test test\Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test -c Release -f netcoreapp1.0
$test2res = $LASTEXITCODE
# upload results to AppVeyor
#$wc = New-Object 'System.Net.WebClient'
#$wc.UploadFile("https://ci.appveyor.com/api/testresults/xunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\TestResult.xml))
IF ($test1res -ne 0 -or $test2res -ne 0) { exit -1 }
artifacts:
- path: src\**\*.nupkg

deploy:
- provider: NuGet
server: https://www.myget.org/F/ili/api/v2
server: https://www.myget.org/F/linq2db/api/v2
api_key:
secure: pFvgey1/w68ZvVHFN/GWZdDFjSABpBRfb0XfLnW3wvhlfyEUiSyfr3dAUcbmlpsk
secure: LDw0jeA1Yo3R4/TKv2kmlgJR8dTT6Wun2MONq3uDvtVQJG4LOU9LjvVTAc7IgRfm
skip_symbols: true
on:
branch: master

- provider: NuGet
api_key:
secure: 9BjFlmIycM3Q3tpwlQRsoC9SPL+BqIoqHKkHihvfR9TvTpYLd9jLcnLnh8eRSmfV
secure: oTYw2IwTnz4qMD8c/MR/6mo+Nx3wa5Pp8MYfsKBCKCVuU6QCHlj+6QMXpnQses8G
skip_symbols: false
on:
branch: master
branch: release
136 changes: 136 additions & 0 deletions build.cake
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
#addin "MagicChunks"

var target = Argument("target", "Default");
var configuration = Argument<string>("configuration", "Release");

///////////////////////////////////////////////////////////////////////////////
// GLOBAL VARIABLES
///////////////////////////////////////////////////////////////////////////////
var isLocalBuild = !AppVeyor.IsRunningOnAppVeyor;
var packPath = Directory("./src/LinqToDB.Identity");
var sourcePath = Directory("./src");
var testsPath = Directory("test");
var buildArtifacts = Directory("./artifacts/packages");
var solutionName = "./LinqToDB.Identity.sln";
var nugetProject = "./src/LinqToDB.Identity/LinqToDB.Identity.csproj";
var envPackageVersion = EnvironmentVariable("nugetVersion");
var argRelease = Argument<string>("Release", null);

var packageSuffix = "";
var packageVersion = "";
var fullPackageVersion = "";

Task("Build")
.IsDependentOn("Clean")
.IsDependentOn("Restore")
.Does(() =>
{

// Patch Version for CI builds
if (!isLocalBuild || envPackageVersion != null)
{
packageVersion = envPackageVersion;
var assemblyVersion = packageVersion + ".0";

if (AppVeyor.Environment.Repository.Branch.ToLower() != "release" && argRelease == null)
{
packageSuffix = "rc" + AppVeyor.Environment.Build.Number.ToString();
fullPackageVersion = packageVersion + "-" + packageSuffix;
}

Console.WriteLine("Package Version: {0}", packageVersion);
Console.WriteLine("Package Suffix : {0}", packageSuffix);
Console.WriteLine("Assembly Version: {0}", assemblyVersion);


TransformConfig(nugetProject, nugetProject,
new TransformationCollection {
{ "Project/PropertyGroup/Version", fullPackageVersion },
{ "Project/PropertyGroup/VersionPrefix", packageVersion },
{ "Project/PropertyGroup/VersionSuffix", packageSuffix },
{ "Project/PropertyGroup/AssemblyVersion", assemblyVersion },
{ "Project/PropertyGroup/FileVersion", assemblyVersion },
});

}

var settings = new DotNetCoreBuildSettings
{
Configuration = configuration
// Runtime = IsRunningOnWindows() ? null : "unix-x64"
};

DotNetCoreBuild(solutionName, settings);
});

Task("RunTests")
.IsDependentOn("Restore")
.IsDependentOn("Clean")
.Does(() =>
{
var projects = GetFiles("./test/**/*.csproj");

foreach(var project in projects)
{
var settings = new DotNetCoreTestSettings
{
Configuration = configuration,
NoBuild = true
};

Console.WriteLine(project.FullPath);

DotNetCoreTest(project.FullPath, settings);
}
});

Task("Pack")
.IsDependentOn("Restore")
.IsDependentOn("Clean")
.Does(() =>
{
var settings = new DotNetCorePackSettings
{
Configuration = configuration,
OutputDirectory = buildArtifacts,
NoBuild = true,
VersionSuffix = packageSuffix
};

/*
if (!string.IsNullOrEmpty(packageVersion))
settings.ArgumentCustomization = b =>
{
Console.WriteLine("Package Version: {0}", packageVersion);
b.Append(" /p:VersionSuffix=" + "rc10");
return b;
};
*/

DotNetCorePack(packPath, settings);
});

Task("Clean")
.Does(() =>
{
CleanDirectories(new DirectoryPath[] { buildArtifacts });
});

Task("Restore")
.Does(() =>
{
var settings = new DotNetCoreRestoreSettings
{
//Sources = new [] { "https://api.nuget.org/v3/index.json" }
};

DotNetCoreRestore(solutionName, settings);
});

Task("Default")
.IsDependentOn("Build")
.IsDependentOn("RunTests")
.IsDependentOn("Pack");

RunTarget(target);
2 changes: 0 additions & 2 deletions build.cmd

This file was deleted.

Loading

0 comments on commit 7c8ad73

Please sign in to comment.