Skip to content

Commit

Permalink
fix(app): Move files to git add
Browse files Browse the repository at this point in the history
  • Loading branch information
Tallyb committed May 13, 2019
1 parent aa402e4 commit f00f674
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/mcfly-semantic-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ fileHelper.getFiles(args.files)
})
.then((msg) => {
console.log(chalk.yellow('Committing version...'));
return gitHelper.commitVersion(msg.nextVersion, args.production)
return gitHelper.commitVersion(msg.nextVersion, args.production, files)
.then(() => msg);
})
.delay(1000)
Expand Down
6 changes: 4 additions & 2 deletions lib/gitHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ const getCurrentBranch = async function() {
return branches.current;
};

const commitVersion = async function(version, production) {
const commitVersion = async function(version, production, files) {
let commitMessage = `chore(app): Version ${version} ${production ? ' production' : ''} `;
let res;
try {
await git.add('.');
res = await git.add(files);
console.log('RES', res);
await git.commit(commitMessage);
await git.addAnnotatedTag(version, 'v' + version);
await git.push('origin', 'master');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mcfly-semantic-release",
"version": "1.1.9",
"version": "1.1.10",
"description": "A cli tool to bump version and publish to github",
"bin": {
"mcfly-semantic-release": "./bin/mcfly-semantic-release.js"
Expand Down

0 comments on commit f00f674

Please sign in to comment.