Added "cleandev" target to clean out stale builds

This commit is contained in:
Steve Streeting 2020-09-08 19:12:12 +01:00
parent c82c10b362
commit cd9ca1508a

View File

@ -15,7 +15,7 @@ function Print-Usage {
Write-Output " " Write-Output " "
Write-Output " -mode : Build mode" Write-Output " -mode : Build mode"
Write-Output " : dev = build Development Editor, dlls only (default)" Write-Output " : dev = build Development Editor, dlls only (default)"
Write-Output " : dev = build Development Editor locally for editor" Write-Output " : cleandev = build Development Editor CLEANLY"
Write-Output " : test = build Development and pacakge for test (TODO)" Write-Output " : test = build Development and pacakge for test (TODO)"
Write-Output " : prod = build Shipping and package for production (TODO)" Write-Output " : prod = build Shipping and package for production (TODO)"
Write-Output " -src : Source folder (current folder if omitted)" Write-Output " -src : Source folder (current folder if omitted)"
@ -45,7 +45,7 @@ if (-not $mode) {
$mode = "dev" $mode = "dev"
} }
if (-not ($mode -in @('dev', 'test', 'prod'))) { if (-not ($mode -in @('dev', 'cleandev', 'test', 'prod'))) {
Print-Usage Print-Usage
Write-Output "ERROR: Invalid mode argument: $mode" Write-Output "ERROR: Invalid mode argument: $mode"
Exit 3 Exit 3
@ -115,6 +115,10 @@ try {
$uprojfileabs = Join-Path "$(Get-Location)" $uprojfile $uprojfileabs = Join-Path "$(Get-Location)" $uprojfile
$buildargs = "${uprojname}Editor Win64 Development -Project=`"${uprojfileabs}`" -WaitMutex -FromMsBuild" $buildargs = "${uprojname}Editor Win64 Development -Project=`"${uprojfileabs}`" -WaitMutex -FromMsBuild"
} }
'cleandev' {
$uprojfileabs = Join-Path "$(Get-Location)" $uprojfile
$buildargs = "${uprojname}Editor Win64 Development -Project=`"${uprojfileabs}`" -WaitMutex -FromMsBuild -clean"
}
default { default {
# TODO # TODO
# We probably want to use custom launch profiles for this # We probably want to use custom launch profiles for this