37 lines
893 B
PowerShell
37 lines
893 B
PowerShell
# 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
|
|
} |