From 50481fe23f0b318521d03e1645a9e5bb5a38fa18 Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Thu, 27 Jul 2017 14:27:15 +0100 Subject: [PATCH 1/4] Update templates to reference ASP.NET Core 2.0.0 final --- templates/AngularSpa/AngularSpa.csproj | 12 ++++++------ templates/AureliaSpa/AureliaSpa.csproj | 12 ++++++------ templates/KnockoutSpa/KnockoutSpa.csproj | 12 ++++++------ templates/ReactReduxSpa/ReactReduxSpa.csproj | 12 ++++++------ templates/ReactSpa/ReactSpa.csproj | 12 ++++++------ templates/VueSpa/VueSpa.csproj | 12 ++++++------ 6 files changed, 36 insertions(+), 36 deletions(-) diff --git a/templates/AngularSpa/AngularSpa.csproj b/templates/AngularSpa/AngularSpa.csproj index 78eaaf2..c2c5cfe 100644 --- a/templates/AngularSpa/AngularSpa.csproj +++ b/templates/AngularSpa/AngularSpa.csproj @@ -9,17 +9,17 @@ - + - - - - + + + + - + diff --git a/templates/AureliaSpa/AureliaSpa.csproj b/templates/AureliaSpa/AureliaSpa.csproj index 83a4abe..eff4c62 100644 --- a/templates/AureliaSpa/AureliaSpa.csproj +++ b/templates/AureliaSpa/AureliaSpa.csproj @@ -9,17 +9,17 @@ - + - - - - + + + + - + diff --git a/templates/KnockoutSpa/KnockoutSpa.csproj b/templates/KnockoutSpa/KnockoutSpa.csproj index 83a4abe..eff4c62 100644 --- a/templates/KnockoutSpa/KnockoutSpa.csproj +++ b/templates/KnockoutSpa/KnockoutSpa.csproj @@ -9,17 +9,17 @@ - + - - - - + + + + - + diff --git a/templates/ReactReduxSpa/ReactReduxSpa.csproj b/templates/ReactReduxSpa/ReactReduxSpa.csproj index 78eaaf2..c2c5cfe 100644 --- a/templates/ReactReduxSpa/ReactReduxSpa.csproj +++ b/templates/ReactReduxSpa/ReactReduxSpa.csproj @@ -9,17 +9,17 @@ - + - - - - + + + + - + diff --git a/templates/ReactSpa/ReactSpa.csproj b/templates/ReactSpa/ReactSpa.csproj index 83a4abe..eff4c62 100644 --- a/templates/ReactSpa/ReactSpa.csproj +++ b/templates/ReactSpa/ReactSpa.csproj @@ -9,17 +9,17 @@ - + - - - - + + + + - + diff --git a/templates/VueSpa/VueSpa.csproj b/templates/VueSpa/VueSpa.csproj index 83a4abe..eff4c62 100644 --- a/templates/VueSpa/VueSpa.csproj +++ b/templates/VueSpa/VueSpa.csproj @@ -9,17 +9,17 @@ - + - - - - + + + + - + From c2e4d4f261d29194eb39513d29a32c167043330f Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Thu, 27 Jul 2017 14:41:55 +0100 Subject: [PATCH 2/4] Re-enable the "dotnet restore" postAction, like the stock templates --- templates/package-builder/src/build/build.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/templates/package-builder/src/build/build.ts b/templates/package-builder/src/build/build.ts index a7aa382..40d4fc0 100644 --- a/templates/package-builder/src/build/build.ts +++ b/templates/package-builder/src/build/build.ts @@ -206,10 +206,23 @@ function buildDotNetNewNuGetPackage(packageId: string) { HostIdentifier: { type: 'bind', binding: 'HostIdentifier' + }, + skipRestore: { + type: 'parameter', + datatype: 'bool', + description: 'If specified, skips the automatic restore of the project on create.', + defaultValue: 'false' } }, tags: { language: 'C#', type: 'project' }, postActions: [ + { + condition: '(!skipRestore)', + description: 'Restore NuGet packages required by this project.', + manualInstructions: [{ text: 'Run \'dotnet restore\'' }], + actionId: '210D431B-A78B-4D2F-B762-4ED3E3EA9025', + continueOnError: true + }, /* // Currently it doesn't appear to be possible to run `npm install` from a // postAction, due to https://github.com/dotnet/templating/issues/849 @@ -245,7 +258,11 @@ function buildDotNetNewNuGetPackage(packageId: string) { }, Framework: { longName: 'framework' - } + }, + skipRestore: { + longName: 'no-restore', + shortName: '' + }, } }, null, 2)); From f5d58f3f2e499325f2fe67878fdae9d18961f88d Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Thu, 27 Jul 2017 14:43:22 +0100 Subject: [PATCH 3/4] Update AppVeyor build to use SDK 006857 --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 9f382f9..ef16c22 100755 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,7 +4,7 @@ install: - ps: Install-Product node 6.9.2 x64 # .NET Core SDK binaries # Download .NET Core 2.0 Preview 3 SDK and add to PATH - - ps: $urlCurrent = "https://dotnetcli.azureedge.net/dotnet/Sdk/2.0.0-preview3-006729/dotnet-sdk-2.0.0-preview3-006729-win-x64.zip" + - ps: $urlCurrent = "https://dotnetcli.azureedge.net/dotnet/Sdk/2.0.0-preview3-006857/dotnet-sdk-2.0.0-preview3-006857-win-x64.zip" - ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetsdk" - ps: mkdir $env:DOTNET_INSTALL_DIR -Force | Out-Null - ps: $tempFileCurrent = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName()) From 169ef12cd80dfcc143bbc11437f3fb1bc86066dc Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Thu, 27 Jul 2017 14:51:21 +0100 Subject: [PATCH 4/4] Change Microsoft.DotNet.Web.Spa.ProjectTemplates to use non-prerelease version number in NuGet package --- templates/package-builder/src/build/build.ts | 11 ++--------- .../Microsoft.DotNet.Web.Spa.ProjectTemplates.nuspec | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/templates/package-builder/src/build/build.ts b/templates/package-builder/src/build/build.ts index 40d4fc0..fab6d48 100644 --- a/templates/package-builder/src/build/build.ts +++ b/templates/package-builder/src/build/build.ts @@ -91,20 +91,13 @@ function copyRecursive(sourceRoot: string, destRoot: string, matchGlob: string) }); } -function leftPad(str: string, minLength: number, padChar: string) { - while (str.length < minLength) { - str = padChar + str; - } - return str; -} - function getBuildNumber(): string { if (process.env.APPVEYOR_BUILD_NUMBER) { - return leftPad(process.env.APPVEYOR_BUILD_NUMBER, 6, '0'); + return process.env.APPVEYOR_BUILD_NUMBER; } // For local builds, use timestamp - return 't-' + Math.floor((new Date().valueOf() - new Date(2017, 0, 1).valueOf()) / (60*1000)); + return Math.floor((new Date().valueOf() - new Date(2017, 0, 1).valueOf()) / (60*1000)) + '-local'; } function buildYeomanNpmPackage(outputRoot: string) { diff --git a/templates/package-builder/src/dotnetnew/Microsoft.DotNet.Web.Spa.ProjectTemplates.nuspec b/templates/package-builder/src/dotnetnew/Microsoft.DotNet.Web.Spa.ProjectTemplates.nuspec index 1406631..05690b8 100644 --- a/templates/package-builder/src/dotnetnew/Microsoft.DotNet.Web.Spa.ProjectTemplates.nuspec +++ b/templates/package-builder/src/dotnetnew/Microsoft.DotNet.Web.Spa.ProjectTemplates.nuspec @@ -2,7 +2,7 @@ Microsoft.DotNet.Web.Spa.ProjectTemplates - 1.0.0-preview-{buildnumber} + 1.0.{buildnumber} Single Page Application templates for ASP.NET Core Microsoft en-US