Skip to content

Commit

Permalink
feat(availity-workflow): allow custom commit message on release
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob McGuinness committed Mar 2, 2018
1 parent 137507f commit 09f284c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions packages/availity-workflow-settings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,10 @@ const settings = {

isEkko() {
return get(this.configuration, 'ekko.enabled', true);
},

commitMessage() {
return argv.message;
}
};

Expand Down
2 changes: 1 addition & 1 deletion packages/availity-workflow/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const customStats = require('./stats');
function bundle(config) {
return new Promise((resolve, reject) => {
if (!settings.isDryRun()) {
Logger.message(`Skipping cleaning directories ${settings.output()}`, 'Dry Run');
Logger.success(`Cleaning directories ${settings.output()}`);
del.sync([settings.output()]);
}

Expand Down
7 changes: 5 additions & 2 deletions packages/availity-workflow/scripts/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ function newLine(contents) {

function tag() {
if (settings.isDistribution() && !settings.isDryRun()) {
const message = settings.commitMessage()
? `${settings.commitMessage()} (v${settings.version})`
: `v${settings.version}`;
shell.exec('git add --all');
shell.exec(`git commit -m "v${settings.version}"`);
shell.exec(`git tag -a v${settings.version} -m "v${settings.version}"`);
shell.exec(`git commit -m "${message}"`);
shell.exec(`git tag -a "v${message}" -m "v${message}"`);
} else {
Logger.message('Skipping git commands', 'Dry Run');
}
Expand Down

0 comments on commit 09f284c

Please sign in to comment.