Add "update-release" target to merge dev branches to release

This commit is contained in:
Pranav K 2014-09-11 06:23:54 -07:00
parent 9c31dbc684
commit 029d6b4b58
1 changed files with 24 additions and 0 deletions

View File

@ -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
-// Resets master branch to release
for each='var repo in GetAllRepos()'
@ -227,6 +248,9 @@ macro name='GitStatus' gitFolder='string'
macro name='GitClean' gitFolder='string'
git gitCommand='clean -xdf'
macro name='GitCommand' gitFolder='string' gitCommand='string'
git
macro name='Exec' program='string' commandline='string' workingdir='string'
exec