From 59083be405e3fe2b23a6df2e58c5042b09b633e6 Mon Sep 17 00:00:00 2001 From: Olivier Date: Sun, 16 Sep 2018 00:21:06 +0200 Subject: [PATCH] Added demands support at build definition level (#92) --- src/teamspsdrive.ps1 | 5 +++++ unit/test/sampleFiles/buildDefvsts.json | Bin 31362 -> 15366 bytes 2 files changed, 5 insertions(+) diff --git a/src/teamspsdrive.ps1 b/src/teamspsdrive.ps1 index fb94bb064..89f2adb62 100644 --- a/src/teamspsdrive.ps1 +++ b/src/teamspsdrive.ps1 @@ -640,6 +640,7 @@ class VSTeamBuildDefinition : VSTeamDirectory { [datetime]$CreatedOn = [datetime]::MinValue [VSTeamBuildDefinitionProcess]$Process = $null [VSTeamBuildDefinitionProcessPhaseStep[]]$Steps = $null + [string[]]$Demands = $null VSTeamBuildDefinition ( [object]$obj, @@ -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 diff --git a/unit/test/sampleFiles/buildDefvsts.json b/unit/test/sampleFiles/buildDefvsts.json index 3c760ca67c94a054faea465f024f8f3b47d79874..c713cf3b9c9fe99d0374754839f5520907a802f8 100644 GIT binary patch literal 15366 zcmeHOTXPdR7JeRnMVD$GfE{0QfdQ&0HpB_#fh3;TnG6uhC3nkqC+${`q)spt|9#I< z-_%#f2@Bb+_#tV#C7q*lm-OlD1Ix0A%|l<27uLpa`s*e2LIz(y;y3twjsL?V;em3w zFO9dliP_8-qsLh`89BbmLD8{}=uw??}dC z)csqTp6dspLe48`O$7Dr`M&EZCa@9tct-vu*i?4rj5@OO_>6oar9puhp^l?xLA`yK zd5-S<^;?;v9E%11N-X`aiSLSwi@suu(K0~OA)8xIHlIF!UL!Fn-I+h)$LybwNyP>B zPy&qZI|?`x_a|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