101_clean.ps1 1.5 KB

1234567891011121314151617181920212223242526272829303132
  1. #**************************************************************************#
  2. #** QUADARAX DEPLOYMENT SCRIPTS **#
  3. #** File: 101_clean.ps1 **#
  4. #** Description: PowerShell script library to clean current solution **#
  5. #** Version: 1.0. **#
  6. #** Updated: 26.7.2019 **#
  7. #**************************************************************************#
  8. param(
  9. # Solution file name with full path. If not defined use global solution
  10. [string] $solutionFile,
  11. # Build configuration Debug / Release / All. If not defined use Debug
  12. [string] $configurationName
  13. )
  14. . ./000_bootstrap.ps1
  15. # Validate inputs
  16. if (!$solutionFile) { $solutionFile = $solutionName}
  17. if (!$configurationName) { $configurationName = $buildCfgDebug}
  18. # Script body section
  19. Write-Host "*** CLEAN - START ***" -ForegroundColor Green
  20. $slnFullPath = ("{0}\{1}" -f $projectDir, $solutionFile)
  21. Write-Host ("Solution name: {0}" -f $slnFullPath) -ForegroundColor Yellow
  22. Write-host ("Configuration: {0}" -f $configurationName) -ForegroundColor Yellow
  23. if ($configurationName -eq $buildCfgAll){
  24. CleanSolution $slnFullPath $buildCfgDebug
  25. CleanSolution $slnFullPath $buildCfgRelease
  26. }
  27. else {
  28. CleanSolution $slnFullPath $configurationName
  29. }
  30. Write-Host "*** CLEAN - END ***" -ForegroundColor Green