Skip to content

Commit a1a37a4

Browse files
committed
fixes in Upgrade
1 parent 227a8e7 commit a1a37a4

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

Signum.Upgrade/Upgrades/Upgrade_20200929_WebAuthn.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ public override void Execute(UpgradeContext uctx)
5555

5656
file.InsertAfterFirstLine(
5757
l => l.Contains("import NotFound from './NotFound'"),
58-
"import Login from '@extensions/Authorization/Login/Login'");
58+
"import LoginPage from '@extensions/Authorization/Login/LoginPage'");
5959

6060
file.InsertBeforeFirstLine(
6161
l => l.Contains("Services.SessionSharing.setAppNameAndRequestSessionStorage"),
62-
@"Login.customLoginButtons = ctx => <WebAuthnClient.WebAuthnLoginButton ctx={ctx} />;
62+
@"LoginPage.customLoginButtons = ctx => <WebAuthnClient.WebAuthnLoginButton ctx={ctx} />;
6363
");
6464

6565
file.InsertAfterFirstLine(

Signum.Upgrade/Upgrades/Upgrade_20201110_DotNet5.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public override void Execute(UpgradeContext uctx)
4949

5050
uctx.ChangeCodeFile($@"Southwind.React/package.json", file =>
5151
{
52+
file.UpgradeNpmPackage("@types/react", "file:../Framework/Signum.React/node_modules/@types/react");
5253
file.UpgradeNpmPackage("node-sass", "5.0.0");
5354
file.UpgradeNpmPackage("sass-loader", "10.1.0");
5455
});
@@ -67,6 +68,23 @@ public override void Execute(UpgradeContext uctx)
6768
a => a.Contains("RUN apt-get -y install nodejs"),
6869
@"RUN apt-get -y install curl
6970
RUN curl -sL https://deb.nodesource.com/setup_15.x | bash -
71+
RUN apt-get install -y nodejs");
72+
});
73+
74+
uctx.ChangeCodeFile($@"Southwind.React/App/MainPublic.tsx", file =>
75+
{
76+
file.ReplaceLine(
77+
a => a.Contains("FROM mcr.microsoft.com/dotnet/core/aspnet"),
78+
"FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim AS base");
79+
file.ReplaceLine(
80+
a => a.Contains("FROM mcr.microsoft.com/dotnet/core/sdk"),
81+
"FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build");
82+
83+
file.ReplaceBetween(
84+
a => a.Contains("RUN apt-get -y install curl"),
85+
a => a.Contains("RUN apt-get -y install nodejs"),
86+
@"RUN apt-get -y install curl
87+
RUN curl -sL https://deb.nodesource.com/setup_15.x | bash -
7088
RUN apt-get install -y nodejs");
7189
});
7290

0 commit comments

Comments
 (0)