From 0de403fdadb5e806677162fe9e9a04e4049e592e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Malec?= Date: Tue, 22 Oct 2024 15:54:31 +0200 Subject: [PATCH] fix restore ci file --- scripts/Restore-CI.ps1 | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/scripts/Restore-CI.ps1 b/scripts/Restore-CI.ps1 index 035ff42..4f92107 100644 --- a/scripts/Restore-CI.ps1 +++ b/scripts/Restore-CI.ps1 @@ -13,6 +13,14 @@ $dbName = $Env:DATABASE_NAME $dbUser = $Env:DATABASE_USER $dbPassword = $Env:DATABASE_PASSWORD +$restoreCommand = "dotnet run " + ` + "--launch-profile $launchProfile " + ` + "-c $configuration " + ` + "--no-build " + ` + "--no-restore " + ` + "--project $projectPath " + ` + "--kxp-ci-restore" + $turnOffCI = "sqlcmd " + ` "-S localhost " + ` "-d $dbName " + ` @@ -20,13 +28,6 @@ $turnOffCI = "sqlcmd " + ` "-P $dbPassword " + ` "-Q `"UPDATE CMS_SettingsKey SET KeyValue = N'False' WHERE KeyName = N'CMSEnableCI'`"" -$turnOnCI = "sqlcmd " + ` - "-S localhost " + ` - "-d $dbName " + ` - "-U $dbUser " + ` - "-P $dbPassword " + ` - "-Q `"UPDATE CMS_SettingsKey SET KeyValue = N'True' WHERE KeyName = N'CMSEnableCI'`"" - $updateCommand = "dotnet run " + ` "--launch-profile $launchProfile " + ` "-c $configuration " + ` @@ -35,18 +36,9 @@ $updateCommand = "dotnet run " + ` "--kxp-update " + ` "--skip-confirmation" -$restoreCommand = "dotnet run " + ` - "--launch-profile $launchProfile " + ` - "-c $configuration " + ` - "--no-build " + ` - "--no-restore " + ` - "--project $projectPath " + ` - "--kxp-ci-restore" Invoke-ExpressionWithException $restoreCommand Invoke-ExpressionWithException $turnOffCI Invoke-ExpressionWithException $updateCommand -Invoke-ExpressionWithException $turnOnCI -# Invoke-ExpressionWithException $storeCommand