From 39551f83f51e4faeac5aa9f1e126fbf1a8da80b2 Mon Sep 17 00:00:00 2001 From: xdimquax Date: Fri, 9 Mar 2018 22:25:03 +0300 Subject: [PATCH] Add branch name parameter --- AU/Plugins/Git.ps1 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/AU/Plugins/Git.ps1 b/AU/Plugins/Git.ps1 index f9382696..b41cacc7 100644 --- a/AU/Plugins/Git.ps1 +++ b/AU/Plugins/Git.ps1 @@ -20,7 +20,10 @@ param( # atomic - 1 commit per package # atomictag - 1 commit and tag per package [ValidateSet('single', 'atomic', 'atomictag')] - [string]$commitStrategy = 'single' + [string]$commitStrategy = 'single', + + # Branch name + [string]$Branch = 'master' ) [array]$packages = if ($Force) { $Info.result.updated } else { $Info.result.pushed } @@ -46,8 +49,8 @@ if ($User -and $Password) { } Write-Host "Executing git pull" -git checkout -q master -git pull -q origin master +git checkout -q $Branch +git pull -q origin $Branch if ($commitStrategy -like 'atomic*') {