Skip to content

Commit

Permalink
fix(git): Throw an error on git operations
Browse files Browse the repository at this point in the history
  • Loading branch information
Tallyb committed May 13, 2019
1 parent e08214c commit c00a18c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/gitHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ const getCurrentBranch = async function() {

const commitVersion = async function(version, production) {
let commitMessage = `chore(app): Version ${version} ${production ? ' production' : ''} `;
await git.add('./*');
await git.commit(commitMessage);
await git.addAnnotatedTag(version, 'v' + version);
await git.push('origin', 'master');
await git.pushTags('origin');
try {
await git.add('./*');
await git.commit(commitMessage);
await git.addAnnotatedTag(version, 'v' + version);
await git.push('origin', 'master');
await git.pushTags('origin');
} catch (e) {
throw new Error(e);
}

};
/**
Expand Down

0 comments on commit c00a18c

Please sign in to comment.