Skip to content

Commit

Permalink
fix restore ci file
Browse files Browse the repository at this point in the history
  • Loading branch information
jiri-malec committed Oct 22, 2024
1 parent 93891af commit 0de403f
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions scripts/Restore-CI.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,21 @@ $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 " + `
"-U $dbUser " + `
"-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 " + `
Expand All @@ -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



Expand Down

0 comments on commit 0de403f

Please sign in to comment.