diff --git a/bin/mcfly-semantic-release.js b/bin/mcfly-semantic-release.js index 2449cc9..35866a9 100755 --- a/bin/mcfly-semantic-release.js +++ b/bin/mcfly-semantic-release.js @@ -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) diff --git a/lib/gitHelper.js b/lib/gitHelper.js index 706c6f5..792e03b 100644 --- a/lib/gitHelper.js +++ b/lib/gitHelper.js @@ -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'); diff --git a/package.json b/package.json index db03303..f4c55c1 100644 --- a/package.json +++ b/package.json @@ -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"