Skip to content

Instantly share code, notes, and snippets.

@egmar
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save egmar/4a608a8342e595b4200b to your computer and use it in GitHub Desktop.
Save egmar/4a608a8342e595b4200b to your computer and use it in GitHub Desktop.
$build_number = "%build.number%"
$checkout_location = "%system.teamcity.build.checkoutDir%"
Clear-Content HEADLESS0.log
$args = '-RPARAMS -vmargs -Dcom.ibm.designer.cmd="true,true,discussion' + $build_number + '.nsf,importandbuild,' + $checkout_location + '\.project,discussion' + $build_number + '.nsf"'
Write-Host $args
$p = Start-Process designer -ArgumentList $args
$target = 'notes2'
$process = Get-Process | Where-Object {$_.ProcessName -eq $target}
do {
Get-Content headless0.log -Wait | Select-String "closing designer" | %{ write-host Found $_; break}
} while(!$process.HasExited)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment