Created
April 19, 2013 07:34
-
-
Save adoprog/5418727 to your computer and use it in GitHub Desktop.
Copy Sitecore files to solution.
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
properties { | |
$distributivePath = "%path to storage%\Sitecore 6.6.0 rev. 130111.zip" | |
$localStorage = "C:\LocalStorage" | |
$distributiveName = [System.IO.Path]::GetFileNameWithoutExtension($distributivePath) | |
$zipFile = "$localStorage\$distributiveName.zip" | |
$buildFolder = Resolve-Path .. | |
$revision = "12345" | |
$buildNumber = "1" | |
} | |
task Init { | |
if (-not (Test-Path $localStorage)) { | |
New-Item $localStorage -type directory -Verbose | |
} | |
if (-not (Test-Path $zipFile)) { | |
Copy-Item $distributivePath $zipFile -Verbose | |
} | |
if (-not (Test-Path $localStorage\$distributiveName)) { | |
sz x -y "-o$localStorage" $zipFile "$distributiveName/Website" | |
sz x -y "-o$localStorage" $zipFile "$distributiveName/Data" | |
} | |
if (Test-Path "$buildFolder\output") { | |
Remove-Item -Recurse -Force "$buildFolder\output" | |
} | |
New-Item "$buildFolder\output" -type directory | |
robocopy $localStorage\$distributiveName $buildFolder /E /XC /XN /XO | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment