diff --git a/gitSpread.ps1 b/gitSpread.ps1 new file mode 100644 index 00000000..2c11b7c5 --- /dev/null +++ b/gitSpread.ps1 @@ -0,0 +1,37 @@ +# Script di creazionereplica su altri rami di un branch git + + + +# Check parameters +Param ( + [Parameter(Mandatory=$True)] + [ValidateNotNull()] + $baseBranch, + [Parameter(Mandatory=$True)] + [ValidateNotNull()] + $pushRemote +) +# recupera timestamp x logging +function Get-TimeStamp +{ + return "[{0:MM/dd/yy} {0:HH:mm:ss}]" -f (Get-Date) +} + +#Write-Output "$(Get-TimeStamp) $baseBranch" + +# ora eseguo push su TUTTI i branch locali... +git push . $baseBranch:develop +git push . $baseBranch:Euromap63 +git push . $baseBranch:IobMan +git push . $baseBranch:Master +git push . $baseBranch:MTC + +# SE richiesto fa push sul remote... +if($pushRemote -eq "y") +{ + git push gitlab.steamware $baseBranch:develop + git push gitlab.steamware $baseBranch:Euromap63 + git push gitlab.steamware $baseBranch:IobMan + git push gitlab.steamware $baseBranch:Master + git push gitlab.steamware $baseBranch:MTC +} \ No newline at end of file