Skip to content

Commit af74202

Browse files
Merge pull request #50 from Axosoft/Allow-onlyMaster-on-finishHotfix-finishRelease
Adds option to skip develop merge
2 parents 78cf5dd + 8db4aac commit af74202

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎src/Hotfix.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ module.exports = (NodeGit, { constants, utils }, { Config }) => {
7777
postDevelopMergeCallback = () => {},
7878
postMasterMergeCallback = () => {},
7979
postCheckoutHook = () => {},
80-
signingCallback
80+
signingCallback,
81+
onlyMaster = false,
8182
} = options;
8283

8384
if (!repo) {
@@ -129,7 +130,7 @@ module.exports = (NodeGit, { constants, utils }, { Config }) => {
129130

130131
// If either develop or master point to the same commit as the hotfix branch cancel
131132
// their respective merge
132-
cancelDevelopMerge = developCommit.id().toString() === hotfixCommit.id().toString();
133+
cancelDevelopMerge = onlyMaster || developCommit.id().toString() === hotfixCommit.id().toString();
133134
cancelMasterMerge = masterCommit.id().toString() === hotfixCommit.id().toString();
134135

135136
// Merge hotfix into develop

‎src/Release.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ module.exports = (NodeGit, { constants, utils }, { Config }) => {
8484
postDevelopMergeCallback = () => {},
8585
postMasterMergeCallback = () => {},
8686
postCheckoutHook = () => {},
87-
signingCallback
87+
signingCallback,
88+
onlyMaster = false,
8889
} = options;
8990

9091
if (!repo) {
@@ -136,7 +137,7 @@ module.exports = (NodeGit, { constants, utils }, { Config }) => {
136137

137138
// If either develop or master point to the same commit as the release branch cancel
138139
// their respective merge
139-
cancelDevelopMerge = developCommit.id().toString() === releaseCommit.id().toString();
140+
cancelDevelopMerge = onlyMaster || developCommit.id().toString() === releaseCommit.id().toString();
140141
cancelMasterMerge = masterCommit.id().toString() === releaseCommit.id().toString();
141142

142143
// Merge release into develop

0 commit comments

Comments
 (0)