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
var files = Directory.GetFiles(Server.MapPath("/sitecore/admin/Packages"), "*.update", SearchOption.AllDirectories); | |
Sitecore.Context.SetActiveSite("shell"); | |
using (new SecurityDisabler()) | |
{ | |
using (new ProxyDisabler()) | |
{ | |
using (new SyncOperationContext()) | |
{ | |
foreach (var file in files) | |
{ |
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
$checkoutFolder = "%teamcity.build.workingDir%" | |
$targetDll = "$checkoutFolder\Website\TestProject\bin\Release\TestProject.dll" | |
$fixture = "TestProject.MediaPlayerEditorTest" | |
$resultXml = "$checkoutFolder\TestResult.xml" | |
rm $resultXml -Force -Verbose -ErrorAction SilentlyContinue | |
$buildOptions = "/xml:$resultXml /fixture:$fixture" | |
$command = 'C:\Chocolatey\bin\nunit-console.bat "$targetDll" ' + $buildOptions |
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
task Compile { | |
exec { msbuild $buildFolder\Website\LaunchSitecore.sln /p:Configuration=Release /t:Clean } | |
exec { msbuild $buildFolder\Website\LaunchSitecore.sln /p:Configuration=Release /t:Build } | |
} |
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
task Courier { | |
New-Item $buildFolder\Data\serialization_empty -type directory -force | |
& "$buildFolder\Buildscript\Tools\Courier\Sitecore.Courier.Runner.exe" /source:$buildFolder\Data\serialization_empty /target:$buildFolder\Data\serialization /output:$buildFolder\Website\sitecore\admin\Packages\LaunchSitecoreItems.update | |
} |
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
task Zip { | |
$outputPath = "$buildFolder\output\LaunchSitecore.Build.$buildNumber.zip" | |
Copy-Item "$buildFolder\website\bin_Net4\*" "$buildFolder\website\bin\" | |
sz a $outputPath "$buildFolder\data" -xr!serialization* -mx1 | |
sz a $outputPath "$buildFolder\website" -mx1 | |
sz a $outputPath "$buildFolder\databases" -xr!*\Oracle\* -mx1 | |
} |
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
$scriptRoot = Split-Path (Resolve-Path $myInvocation.MyCommand.Path) | |
if (-not (test-path "$env:ProgramFiles\7-Zip\7z.exe")) {throw "$env:ProgramFiles\7-Zip\7z.exe needed"} | |
set-alias sz "$env:ProgramFiles\7-Zip\7z.exe" | |
properties { | |
$distributivePath = "C:\Sitecore 6.6.0 rev. 130404.zip" | |
$localStorage = "C:\LocalStorage" | |
$distributiveName = [System.IO.Path]::GetFileNameWithoutExtension($distributivePath) | |
$zipFile = "$localStorage\$distributiveName.zip" |
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
Clear-Host | |
remove-module [p]sake | |
import-module .\Tools\psake\psake.psm1 | |
$psake.use_exit_on_error = $true | |
Invoke-psake .\buildscript.ps1 Package -properties @{ buildNumber = '12345'; } |
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
$buildFolder = Resolve-Path .. | |
$sourcePath = "$buildFolder\Output\LaunchSitecore.Build.12345.zip" |
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
# Cleanup Databases from previuous installation (if needed) | |
foreach ($db in $databases) | |
{ | |
Delete-Database $server "$siteName.$db" | |
} |
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
Clear-Host | |
# Framework initialization | |
$scriptRoot = Split-Path (Resolve-Path $myInvocation.MyCommand.Path) | |
$env:PSModulePath = $env:PSModulePath + ";$scriptRoot\Tools\PowerCore\Framework" | |
Import-Module WebUtils | |
Import-Module ConfigUtils | |
Import-Module DBUtils | |
Import-Module IISUtils |