Powershell Automated script 系列: Get the latest changeset number

分類:編程 時間:2017-02-03

$tfspath="C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe"

$tfptpath="C:\Program Files\Microsoft Team Foundation Server 2010 Power Tools\tfpt.exe"

$localpath="D:\TFS\BuildAutomation\Intrinsic\Browser"



#set up workspace location
Push-Location -Path $localpath

$result=& $tfspath history . /r /noprompt /stopafter:1 /version:W

"$result" -match "\d+"

Write-Host $matches[0]

& $tfptpath workitem /update /s:<YourTeamServer> <YourWorkItemId> /fields:"History=Associated to changeset 123"

Pop-Location


Tags: Microsoft Browser history version latest

文章來源:


ads
ads

相關文章
ads

相關文章

ad