Skip to content

Commit

Permalink
feat(cli): add files to git and commit changes with message
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Jun 5, 2020
1 parent 4fb2c10 commit c878c3d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const devDependencies = [
'standard-version'
];
exec(`npm install --save-dev ${devDependencies.join(' ')}`);
exec('git add package.json');

/**
* Copy files.
Expand All @@ -83,8 +84,17 @@ const filesPath = resolve(__dirname, 'files');
readdirSync(filesPath).forEach(filename => {
const source = resolve(filesPath, filename);
const destination = resolve(cwd, filename);
log(`Copying \`${filename}\``);
log(`Copying \`${filename}\`...`);
copyFileSync(source, destination);
exec(`git add ${filename}`);
});

/**
* Commit changes.
*/
log('Committing changes...');
exec(
'git commit -m "chore: run `conventional-release-setup`" -m "https://github.com/remarkablemark/conventional-release-setup"'
);

log(`${name} done`);

0 comments on commit c878c3d

Please sign in to comment.