From c3992acf3a8c7a6fa7f3dde2f31a12556b21b091 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 7 May 2018 11:36:44 -0700 Subject: [PATCH] Update script to fixup app version --- migrations/updateMigrations.cmd | 7 ++++++- .../00000000000000_CreateIdentitySchema.Designer.cs | 2 +- .../Data/SqlLite/ApplicationDbContextModelSnapshot.cs | 2 +- .../00000000000000_CreateIdentitySchema.Designer.cs | 2 +- .../Data/SqlServer/ApplicationDbContextModelSnapshot.cs | 2 +- .../00000000000000_CreateIdentitySchema.Designer.cs | 2 +- .../Data/SqlLite/ApplicationDbContextModelSnapshot.cs | 2 +- .../00000000000000_CreateIdentitySchema.Designer.cs | 2 +- .../Data/SqlServer/ApplicationDbContextModelSnapshot.cs | 2 +- 9 files changed, 14 insertions(+), 9 deletions(-) diff --git a/migrations/updateMigrations.cmd b/migrations/updateMigrations.cmd index 7d9a33ee15..d49dbc1499 100644 --- a/migrations/updateMigrations.cmd +++ b/migrations/updateMigrations.cmd @@ -1,4 +1,5 @@ -SET version=2.1.0 +SET version=2.2.0-preview1 +SET AppVersion=2.2.0-preview1-34066 echo Make sure to have ran build.cmd once to ensure artifacts have been created. echo Generating version=%version%, edit updateMigrations.cmd to update the version. @@ -7,6 +8,7 @@ rd "Company.WebApplication1" /s /q mkdir "Company.WebApplication1" dotnet new razor --auth Individual -i ..\artifacts\build\Microsoft.DotNet.Web.ProjectTemplates.*.nupkg -o Company.WebApplication1 rd "Company.WebApplication1\Data\Migrations" /s /q +powershell.exe -command "(Get-Content Company.WebApplication1\Company.WebApplication1.csproj) -replace('App\"', 'App\" Version=\"%AppVersion%\"') | Set-Content Company.WebApplication1\Company.WebApplication1.csproj" cd Company.WebApplication1 dotnet ef migrations add CreateIdentitySchema -o Data\Migrations cd .. @@ -22,6 +24,7 @@ rd "Company.WebApplication1" /s /q mkdir "Company.WebApplication1" dotnet new razor --auth Individual --use-local-db -i ..\artifacts\build\Microsoft.DotNet.Web.ProjectTemplates.*.nupkg -o Company.WebApplication1 rd "Company.WebApplication1\Data\Migrations" /s /q +powershell.exe -command "(Get-Content Company.WebApplication1\Company.WebApplication1.csproj) -replace('App\"', 'App\" Version=\"%AppVersion%\"') | Set-Content Company.WebApplication1\Company.WebApplication1.csproj" cd Company.WebApplication1 dotnet ef migrations add CreateIdentitySchema -o Data\Migrations cd .. @@ -37,6 +40,7 @@ echo Generating migration for StarterWeb-SqlServer(localb)-------------- mkdir "Company.WebApplication1" dotnet new mvc --auth Individual --use-local-db -i ..\artifacts\build\Microsoft.DotNet.Web.ProjectTemplates.*.nupkg -o Company.WebApplication1 rd "Company.WebApplication1\Data\Migrations" /s /q +powershell.exe -command "(Get-Content Company.WebApplication1\Company.WebApplication1.csproj) -replace('App\"', 'App\" Version=\"%AppVersion%\"') | Set-Content Company.WebApplication1\Company.WebApplication1.csproj" cd Company.WebApplication1 dotnet ef migrations add CreateIdentitySchema -o Data\Migrations cd .. @@ -52,6 +56,7 @@ rd "Company.WebApplication1" /s /q mkdir "Company.WebApplication1" dotnet new mvc --auth Individual -i ..\artifacts\build\Microsoft.DotNet.Web.ProjectTemplates.*.nupkg -o Company.WebApplication1 rd "Company.WebApplication1\Data\Migrations" /s /q +powershell.exe -command "(Get-Content Company.WebApplication1\Company.WebApplication1.csproj) -replace('App\"', 'App\" Version=\"%AppVersion%\"') | Set-Content Company.WebApplication1\Company.WebApplication1.csproj" cd Company.WebApplication1 dotnet ef migrations add CreateIdentitySchema -o Data\Migrations cd .. diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Data/SqlLite/00000000000000_CreateIdentitySchema.Designer.cs b/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Data/SqlLite/00000000000000_CreateIdentitySchema.Designer.cs index 3392f2ce19..33568e6189 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Data/SqlLite/00000000000000_CreateIdentitySchema.Designer.cs +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Data/SqlLite/00000000000000_CreateIdentitySchema.Designer.cs @@ -16,7 +16,7 @@ namespace Company.WebApplication1.Data.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "2.1.0"); + .HasAnnotation("ProductVersion", "2.2.0-preview1"); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Data/SqlLite/ApplicationDbContextModelSnapshot.cs b/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Data/SqlLite/ApplicationDbContextModelSnapshot.cs index 15daad4135..836ae699c4 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Data/SqlLite/ApplicationDbContextModelSnapshot.cs +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Data/SqlLite/ApplicationDbContextModelSnapshot.cs @@ -14,7 +14,7 @@ namespace Company.WebApplication1.Data.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "2.1.0"); + .HasAnnotation("ProductVersion", "2.2.0-preview1"); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Data/SqlServer/00000000000000_CreateIdentitySchema.Designer.cs b/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Data/SqlServer/00000000000000_CreateIdentitySchema.Designer.cs index d09bb7025c..49cf654246 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Data/SqlServer/00000000000000_CreateIdentitySchema.Designer.cs +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Data/SqlServer/00000000000000_CreateIdentitySchema.Designer.cs @@ -17,7 +17,7 @@ namespace Company.WebApplication1.Data.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "2.1.0") + .HasAnnotation("ProductVersion", "2.2.0-preview1") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Data/SqlServer/ApplicationDbContextModelSnapshot.cs b/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Data/SqlServer/ApplicationDbContextModelSnapshot.cs index 261af85933..e5d4616c81 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Data/SqlServer/ApplicationDbContextModelSnapshot.cs +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Data/SqlServer/ApplicationDbContextModelSnapshot.cs @@ -15,7 +15,7 @@ namespace Company.WebApplication1.Data.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "2.1.0") + .HasAnnotation("ProductVersion", "2.2.0-preview1") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Data/SqlLite/00000000000000_CreateIdentitySchema.Designer.cs b/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Data/SqlLite/00000000000000_CreateIdentitySchema.Designer.cs index 3392f2ce19..33568e6189 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Data/SqlLite/00000000000000_CreateIdentitySchema.Designer.cs +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Data/SqlLite/00000000000000_CreateIdentitySchema.Designer.cs @@ -16,7 +16,7 @@ namespace Company.WebApplication1.Data.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "2.1.0"); + .HasAnnotation("ProductVersion", "2.2.0-preview1"); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Data/SqlLite/ApplicationDbContextModelSnapshot.cs b/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Data/SqlLite/ApplicationDbContextModelSnapshot.cs index 15daad4135..836ae699c4 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Data/SqlLite/ApplicationDbContextModelSnapshot.cs +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Data/SqlLite/ApplicationDbContextModelSnapshot.cs @@ -14,7 +14,7 @@ namespace Company.WebApplication1.Data.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "2.1.0"); + .HasAnnotation("ProductVersion", "2.2.0-preview1"); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Data/SqlServer/00000000000000_CreateIdentitySchema.Designer.cs b/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Data/SqlServer/00000000000000_CreateIdentitySchema.Designer.cs index d09bb7025c..49cf654246 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Data/SqlServer/00000000000000_CreateIdentitySchema.Designer.cs +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Data/SqlServer/00000000000000_CreateIdentitySchema.Designer.cs @@ -17,7 +17,7 @@ namespace Company.WebApplication1.Data.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "2.1.0") + .HasAnnotation("ProductVersion", "2.2.0-preview1") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); diff --git a/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Data/SqlServer/ApplicationDbContextModelSnapshot.cs b/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Data/SqlServer/ApplicationDbContextModelSnapshot.cs index 261af85933..e5d4616c81 100644 --- a/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Data/SqlServer/ApplicationDbContextModelSnapshot.cs +++ b/src/Microsoft.DotNet.Web.ProjectTemplates/content/StarterWeb-CSharp/Data/SqlServer/ApplicationDbContextModelSnapshot.cs @@ -15,7 +15,7 @@ namespace Company.WebApplication1.Data.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "2.1.0") + .HasAnnotation("ProductVersion", "2.2.0-preview1") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);