Add "update-release" target to merge dev branches to release
This commit is contained in:
parent
9c31dbc684
commit
029d6b4b58
|
|
@ -111,6 +111,27 @@ functions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#update-release
|
||||||
|
-// Merge dev branch to release
|
||||||
|
@{
|
||||||
|
foreach (var repo in GetAllRepos())
|
||||||
|
{
|
||||||
|
CloneOrUpdate(repo);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
GitCommand(repo, "checkout release");
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// If the release branch does not exist, create a new branch and reset origin/dev to it.
|
||||||
|
GitCommand(repo, "checkout origin/dev -b release");
|
||||||
|
}
|
||||||
|
|
||||||
|
GitCommand(repo, "merge origin/dev");
|
||||||
|
GitCommand(repo, "push origin release");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#reset-master
|
#reset-master
|
||||||
-// Resets master branch to release
|
-// Resets master branch to release
|
||||||
for each='var repo in GetAllRepos()'
|
for each='var repo in GetAllRepos()'
|
||||||
|
|
@ -227,6 +248,9 @@ macro name='GitStatus' gitFolder='string'
|
||||||
macro name='GitClean' gitFolder='string'
|
macro name='GitClean' gitFolder='string'
|
||||||
git gitCommand='clean -xdf'
|
git gitCommand='clean -xdf'
|
||||||
|
|
||||||
|
macro name='GitCommand' gitFolder='string' gitCommand='string'
|
||||||
|
git
|
||||||
|
|
||||||
macro name='Exec' program='string' commandline='string' workingdir='string'
|
macro name='Exec' program='string' commandline='string' workingdir='string'
|
||||||
exec
|
exec
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue