Skip to content

Commit

Permalink
Updates to Octopus deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
BlythMeister committed Dec 7, 2017
1 parent 540eb6b commit ecbe20f
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/Deploy/deploy.ps1
Expand Up @@ -2,28 +2,30 @@ $scriptDir = Split-Path ((Get-Variable MyInvocation -Scope 0).Value.MyCommand.Pa

if($FrameworkNeeded -eq $null)
{
$FrameworkNeeded = "NET461"
$FrameworkNeeded = "NET461"
}

$ServiceBouncer = Get-Process ServiceBouncer -ErrorAction SilentlyContinue
if ($ServiceBouncer) {
Write-Host "Application Running, Attempting to Stop"
$ServiceBouncer | Stop-Process -Force
Write-Host "Application Running, Attempting to Stop"
$ServiceBouncer | Stop-Process -Force
Write-Host "Sleeping for 10 seconds to allow for Stop"
Start-Sleep -s 10
}
else
{
Write-Host "Application Not Running"
Write-Host "Application Not Running"
}

if(Test-Path $DeployPath)
{
Write-Host "Removing Directory Found at $DeployPath"
Remove-Item $DeployPath -Force -Recurse
Start-Sleep -s 2
Write-Host "Removing Directory Found at $DeployPath"
Remove-Item $DeployPath -Force -Recurse
Start-Sleep -s 2
}

Write-Host "Creating Directory at $DeployPath"
New-Item $DeployPath -Type container

Write-Host "Deploying from Content\$FrameworkNeeded to $DeployPath"
Write-Host "Deploying from framework version $FrameworkNeeded to $DeployPath"
Copy-Item "$scriptDir\Content\$FrameworkNeeded\*" $DeployPath -Force -Recurse

0 comments on commit ecbe20f

Please sign in to comment.