Skip to content

Commit

Permalink
Added demands support at build definition level (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
hangar18rip authored and DarqueWarrior committed Sep 15, 2018
1 parent 84ee80c commit 59083be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/teamspsdrive.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ class VSTeamBuildDefinition : VSTeamDirectory {
[datetime]$CreatedOn = [datetime]::MinValue
[VSTeamBuildDefinitionProcess]$Process = $null
[VSTeamBuildDefinitionProcessPhaseStep[]]$Steps = $null
[string[]]$Demands = $null

VSTeamBuildDefinition (
[object]$obj,
Expand All @@ -665,6 +666,10 @@ class VSTeamBuildDefinition : VSTeamDirectory {
if ($obj.PSObject.Properties.Match('retentionRules').count -gt 0) {
$this.RetentionRules = $obj.retentionRules
}

if ($obj.PSObject.Properties.Match('demands').count -gt 0) {
$this.Demands = $obj.demands
}

if ($obj.PSObject.Properties.Match('options').count -gt 0) {
$this.Options = $obj.options
Expand Down
Binary file modified unit/test/sampleFiles/buildDefvsts.json
Binary file not shown.

0 comments on commit 59083be

Please sign in to comment.