tfsbuild - how to get current branch from TFS postbuild scripts -
tfsbuild - how to get current branch from TFS postbuild scripts -
i've current branch name tfs post build scripts. based on branch name, i've execute steps. kindly help me on
it not possible solve in general case: depends how 1 organizes version command (see graphic).
$ | +--project1 | | | +--branch1 | | | +--branch2 | +--project2 | +--app1 | | | +--branch3 | +--app2 | +--branch4
you can apply either 1 of these techniques:
get path of post-build script (assuming part of branch) pass name of branch build parameterto path in batch file utilize %p0
, in powershell utilize $psscriptroot
, have parse , extract branch portion.
to implement sec option, must customize build template require parameter , pass script.
tfs tfsbuild
Comments
Post a Comment