Last active
October 14, 2015 07:14
-
-
Save JamesGreenAU/4b107c998243aa3aa782 to your computer and use it in GitHub Desktop.
Post deploy step for migrating media from one Umbraco web root to another.
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
# | |
# Copies the Media folder from the previous release folder to the newly deployed folder. | |
# | |
cd $OctopusOriginalPackageDirectoryPath | |
cd .. | |
Write-Host "Moving media folder for release " $OctopusParameters["Octopus.Release.Number"] | |
$R = Get-ChildItem | Sort-Object Name | select -last 2 | |
$old = $R[0] | |
$new = $R[1] | |
Copy-Item -recurse $old\media $new -Force | |
Write-Host "Copied \media\ from" $old.FullName " to " $new.FullName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment