Merge branch 'release/2.1' into dev
This commit is contained in:
Коммит
bd9e53015d
|
@ -1,22 +1,19 @@
|
|||
init:
|
||||
- git config --global core.autocrlf true
|
||||
init:
|
||||
- git config --global core.autocrlf true
|
||||
install:
|
||||
- ps: Install-Product node 8 x64
|
||||
- ps: Install-Product node 8 x64
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- release
|
||||
- dev
|
||||
- /^rel\/.*/
|
||||
- /^release\/.*/
|
||||
- /^(.*\/)?ci-.*$/
|
||||
- dev
|
||||
- /^release\/.*$/
|
||||
- /^(.*\/)?ci-.*$/
|
||||
build_script:
|
||||
- ps: .\build.cmd
|
||||
- ps: .\build.cmd
|
||||
clone_depth: 1
|
||||
environment:
|
||||
global:
|
||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
test: off
|
||||
deploy: off
|
||||
test: 'off'
|
||||
deploy: 'off'
|
||||
os: Visual Studio 2017
|
||||
|
|
26
.travis.yml
26
.travis.yml
|
@ -3,25 +3,27 @@ sudo: required
|
|||
dist: trusty
|
||||
env:
|
||||
global:
|
||||
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
||||
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
- TRAVIS_NODE_VERSION: 8.9.3
|
||||
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
||||
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
- TRAVIS_NODE_VERSION: 8.9.3
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libunwind8
|
||||
- libunwind8
|
||||
mono: none
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
- linux
|
||||
- osx
|
||||
osx_image: xcode9.2
|
||||
branches:
|
||||
only:
|
||||
- dev
|
||||
- /^release\/.*$/
|
||||
- /^(.*\/)?ci-.*$/
|
||||
- dev
|
||||
- /^release\/.*$/
|
||||
- /^(.*\/)?ci-.*$/
|
||||
before_install:
|
||||
- nvm install $TRAVIS_NODE_VERSION
|
||||
- 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
|
||||
- nvm install $TRAVIS_NODE_VERSION
|
||||
- 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
|
||||
script:
|
||||
- ./build.sh
|
||||
- ./build.sh
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
|
|
|
@ -13,8 +13,10 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="${MicrosoftEntityFrameworkCoreSqlitePackageVersion}" Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' != 'True'" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="${MicrosoftEntityFrameworkCoreToolsPackageVersion}" PrivateAssets="All" Condition="'$(IndividualAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="${MicrosoftVisualStudioWebBrowserLinkPackageVersion}" Condition="'$(UseBrowserLink)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="${MicrosoftVisualStudioWebCodeGenerationDesignPackageVersion}" PrivateAssets="All" Condition="'$(IndividualAuth)' == 'True'" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -15,8 +15,10 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="${MicrosoftEntityFrameworkCoreSqlitePackageVersion}" Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' != 'True'" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="${MicrosoftEntityFrameworkCoreToolsPackageVersion}" PrivateAssets="All" Condition="'$(IndividualAuth)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="${MicrosoftVisualStudioWebBrowserLinkPackageVersion}" Condition="'$(UseBrowserLink)' == 'True'" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="${MicrosoftVisualStudioWebCodeGenerationDesignPackageVersion}" PrivateAssets="All" Condition="'$(IndividualAuth)' == 'True'" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="${MicrosoftAspNetCorePackageVersion}" />
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="${MicrosoftAspNetCoreSpaServicesExtensionsPackageVersion}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="${MicrosoftAspNetCoreSpaServicesExtensionsPackageVersion}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="${MicrosoftAspNetCoreAllPackageVersion}" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="${MicrosoftAspNetCoreSpaServicesExtensionsPackageVersion}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace Templates.Test
|
|||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected void RunDotNetNew(string templateName, string targetFrameworkOverride, string auth = null, string language = null)
|
||||
protected void RunDotNetNew(string templateName, string targetFrameworkOverride, string auth = null, string language = null, bool useLocalDB = false)
|
||||
{
|
||||
var args = $"new {templateName}";
|
||||
|
||||
|
@ -66,6 +66,11 @@ namespace Templates.Test
|
|||
args += $" -lang {language}";
|
||||
}
|
||||
|
||||
if (useLocalDB)
|
||||
{
|
||||
args += $" -uld";
|
||||
}
|
||||
|
||||
// Only run one instance of 'dotnet new' at once, as a workaround for
|
||||
// https://github.com/aspnet/templating/issues/63
|
||||
lock (DotNetNewLock)
|
||||
|
|
|
@ -65,16 +65,23 @@ namespace Templates.Test
|
|||
public void MvcTemplate_IndividualAuth_Works_NetCore()
|
||||
=> MvcTemplate_IndividualAuthImpl(null);
|
||||
|
||||
private void MvcTemplate_IndividualAuthImpl(string targetFrameworkOverride)
|
||||
[Fact]
|
||||
public void MvcTemplate_IndividualAuth_UsingLocalDB_Works_NetCore()
|
||||
=> MvcTemplate_IndividualAuthImpl(null, true);
|
||||
|
||||
private void MvcTemplate_IndividualAuthImpl(string targetFrameworkOverride, bool useLocalDB = false)
|
||||
{
|
||||
RunDotNetNew("mvc", targetFrameworkOverride, auth: "Individual");
|
||||
RunDotNetNew("mvc", targetFrameworkOverride, auth: "Individual", useLocalDB: useLocalDB);
|
||||
|
||||
AssertDirectoryExists("Extensions", false);
|
||||
AssertFileExists("urlRewrite.config", false);
|
||||
AssertFileExists("Controllers/AccountController.cs", false);
|
||||
|
||||
var projectFileContents = ReadFile($"{ProjectName}.csproj");
|
||||
Assert.Contains(".db", projectFileContents);
|
||||
if (!useLocalDB)
|
||||
{
|
||||
Assert.Contains(".db", projectFileContents);
|
||||
}
|
||||
Assert.Contains("Microsoft.EntityFrameworkCore.Tools", projectFileContents);
|
||||
Assert.Contains("Microsoft.VisualStudio.Web.CodeGeneration.Design", projectFileContents);
|
||||
Assert.Contains("Microsoft.EntityFrameworkCore.Tools.DotNet", projectFileContents);
|
||||
|
|
|
@ -56,15 +56,21 @@ namespace Templates.Test
|
|||
[Fact]
|
||||
public void RazorPagesTemplate_IndividualAuth_Works_NetCore()
|
||||
=> RazorPagesTemplate_IndividualAuthImpl(null);
|
||||
[Fact]
|
||||
public void RazorPagesTemplate_IndividualAuth_UsingLocalDB_Works_NetCore()
|
||||
=> RazorPagesTemplate_IndividualAuthImpl(null, true);
|
||||
|
||||
private void RazorPagesTemplate_IndividualAuthImpl(string targetFrameworkOverride)
|
||||
private void RazorPagesTemplate_IndividualAuthImpl(string targetFrameworkOverride, bool useLocalDB = false)
|
||||
{
|
||||
RunDotNetNew("razor", targetFrameworkOverride, auth: "Individual");
|
||||
RunDotNetNew("razor", targetFrameworkOverride, auth: "Individual", useLocalDB: useLocalDB);
|
||||
|
||||
AssertFileExists("Pages/Shared/_LoginPartial.cshtml", true);
|
||||
|
||||
var projectFileContents = ReadFile($"{ProjectName}.csproj");
|
||||
Assert.Contains(".db", projectFileContents);
|
||||
if (!useLocalDB)
|
||||
{
|
||||
Assert.Contains(".db", projectFileContents);
|
||||
}
|
||||
Assert.Contains("Microsoft.EntityFrameworkCore.Tools", projectFileContents);
|
||||
Assert.Contains("Microsoft.VisualStudio.Web.CodeGeneration.Design", projectFileContents);
|
||||
Assert.Contains("Microsoft.EntityFrameworkCore.Tools.DotNet", projectFileContents);
|
||||
|
|
Загрузка…
Ссылка в новой задаче