Fixed issue with dir cleanup in deploy script
This commit is contained in:
parent
8d733b7608
commit
62a7c6609e
16
deploy.ps1
16
deploy.ps1
@ -6,10 +6,18 @@ New-Item -Path "C:\inetpub\wwwroot\" -Name "enpaul.net.new" -ItemType Directory
|
||||
|
||||
Copy-Item -Path ".\*" -Destination "C:\inetpub\wwwroot\enpaul.net.new\" -Force -Recurse
|
||||
|
||||
Remove-Item -Path "C:\inetpub\wwwroot\enpaul.net.new\.git" -Recurse -Force
|
||||
Remove-Item -Path "C:\inetpub\wwwroot\enpaul.net.new\.gitlab-ci.yml" -Force
|
||||
Remove-Item -Path "C:\inetpub\wwwroot\enpaul.net.new\deploy.ps1" -Force
|
||||
Remove-Item -Path "C:\inetpub\wwwroot\enpaul.net.new\"
|
||||
if (Test-Path "C:\inetpub\wwwroot\enpaul.net.new\.git") {
|
||||
Remove-Item -Path "C:\inetpub\wwwroot\enpaul.net.new\.git" -Recurse -Force
|
||||
}
|
||||
if (Test-Path "C:\inetpub\wwwroot\enpaul.net.new\.gitlab-ci.yml") {
|
||||
Remove-Item -Path "C:\inetpub\wwwroot\enpaul.net.new\.gitlab-ci.yml" -Force
|
||||
}
|
||||
if (Test-Path "C:\inetpub\wwwroot\enpaul.net.new\deploy.ps1") {
|
||||
Remove-Item -Path "C:\inetpub\wwwroot\enpaul.net.new\deploy.ps1" -Force
|
||||
}
|
||||
if (Test-Path "C:\inetpub\wwwroot\enpaul.net.new\.gitignore") {
|
||||
Remove-Item -Path "C:\inetpub\wwwroot\enpaul.net.new\.gitignore" -Force
|
||||
}
|
||||
|
||||
Rename-Item -Path "C:\inetpub\wwwroot\enpaul.net" -NewName "enpaul.net.old" -Force
|
||||
Rename-Item -Path "C:\inetpub\wwwroot\enpaul.net.new" -NewName "enpaul.net" -Force
|
||||
|
Loading…
Reference in New Issue
Block a user