UNPKG

ice.fo.utils

Version:

17 lines (14 loc) 417 B
module.exports = function pushBranches({ branches }) { const currentBranch = exports.getCurrentBrannch(); for (const branchName of branches) { try { console.log('[Push to Remote]', branchName); exports.checkoutToBranch(branchName); exports.pullLatest(); exports.pushCommits(); } catch (error) { console.error(error); } } exports.checkoutToBranch(currentBranch); };