Skip to content

Instantly share code, notes, and snippets.

@tugberkugurlu
Created January 12, 2016 12:37
Show Gist options
  • Save tugberkugurlu/336b346179e8472ee56a to your computer and use it in GitHub Desktop.
Save tugberkugurlu/336b346179e8472ee56a to your computer and use it in GitHub Desktop.
Octopus Deploy "Deploy Application" step which deploys to local folder
$folder = $OctopusParameters["app-directory"]
$packagePath = $OctopusParameters["Octopus.Action[Extract App Package].Output.Package.InstallationDirectoryPath"]
Remove-Item "$folder\*" -Recurse -Force
Copy-Item $packagePath -Destination $folder -Recurse
$tempFolder = "$folder\$((dir $folder | select -First 1).Name)"
Copy-Item "$tempFolder\*" -Destination "$folder" -Recurse
Remove-Item "$tempFolder" -Recurse -Force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment