generated from Kentico/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
374e28e
commit c6d8229
Showing
6 changed files
with
45 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,18 @@ | ||
Import-Module (Resolve-Path Utilities) ` | ||
-Function ` | ||
Get-WebProjectPath, ` | ||
Invoke-ExpressionWithException, ` | ||
Write-Status ` | ||
-Force | ||
if ($Env:ASPNETCORE_ENVIRONMENT -eq "CI") { | ||
$launchProfile = "K13Ecommerce.WebCI" | ||
$configuration = "Release" | ||
} else { | ||
$launchProfile = "DancingGoat" | ||
$configuration = "Debug" | ||
} | ||
|
||
$projectPath = Get-WebProjectPath | ||
$repositoryPath = Join-Path $projectPath "App_Data/CIRepository" | ||
$launchProfile = $Env:ASPNETCORE_ENVIRONMENT -eq "CI" ? "K13Ecommerce.WebCI" : "DancingGoat" | ||
$configuration = $Env:ASPNETCORE_ENVIRONMENT -eq "CI" ? "Release" : "Debug" | ||
dotnet run ` | ||
--launch-profile $launchProfile ` | ||
-c $configuration ` | ||
--no-build ` | ||
--no-restore ` | ||
--kxp-ci-restore | ||
|
||
$command = "dotnet run " + ` | ||
"--launch-profile $launchProfile " + ` | ||
"-c $configuration " + ` | ||
"--no-build " + ` | ||
"--no-restore " + ` | ||
"--project $projectPath " + ` | ||
"--kxp-ci-restore" | ||
|
||
Invoke-ExpressionWithException $command | ||
|
||
Write-Host "`n" | ||
Write-Status 'CI files processed' | ||
Write-Host "`n" | ||
Write-Host "" | ||
Write-Host 'CI files processed' | ||
Write-Host "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
param ( | ||
[switch]$CIEnabled | ||
) | ||
|
||
# Use a conditional expression to set KeyValue based on the boolean $Argument | ||
$keyValue = if ($CIEnabled) { 'True' } else { 'False' } | ||
|
||
|
||
# Check the environment variable | ||
if ($Env:ASPNETCORE_ENVIRONMENT -eq "CI") { | ||
sqlcmd ` | ||
-S localhost ` | ||
-d XByK_DancingGoat_K13Ecommerce ` | ||
-U "sa" ` | ||
-P "Pass@12345" ` | ||
-Q "UPDATE CMS_SettingsKey SET KeyValue='$keyValue' WHERE KeyName='CMSEnableCI'" | ||
} else { | ||
sqlcmd ` | ||
-S localhost\SQLEXPRESS ` | ||
-d XByK_DancingGoat_K13Ecommerce ` | ||
-E ` | ||
-Q "UPDATE CMS_SettingsKey SET KeyValue='$keyValue' WHERE KeyName='CMSEnableCI'" | ||
} | ||
|
||
Write-Output "CI restore for Enabled=$keyValue" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.