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