Commits

Kevin Berridge committed 7f1c37d

added psglass function

  • Participants
  • Parent commits d523378

Comments (0)

Files changed (1)

Microsoft.PowerShell_profile.ps1

         default { DefaultTabExpansion $line $lastWord }
     }
 }
+
+# function which serves your psake that understands parameters
+function psglass {
+  param(
+      [Parameter(Mandatory=$true, Position=0)]
+      [string]$taskname,
+      [alias("e")]
+      [string]$pbenv=$null,
+      [alias("t")]
+      [string[]]$tags=$null
+  )
+
+  $props = @{}
+  if ($pbenv -ne $null -and $pbenv -ne [String]::Empty) {
+    $props.environment = $pbenv
+  }
+  $params = @{}
+  if ($tags -ne $null) {
+    $params.tags = $tags
+  }
+
+  invoke-psake $taskname -properties $props -parameters $params
+}