Skip to content

Commit

Permalink
show old version in git commit msg
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbyquaker committed Aug 8, 2020
1 parent 851c064 commit cd3c731
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions update_dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ async function compareVersions(dir) {

const actual = dependencies[pkg];
const latest = json.body['dist-tags'].latest;
if (dependencies[pkg] !== latest) {
if (actual !== latest) {
const response = await prompts({
type: 'confirm',
name: 'confirmed',
message: `update ${pkg} ${dependencies[pkg]} to ${latest}?`
message: `update ${pkg} ${actual} to ${latest}?`
});
if (response.confirmed) {
dependencies[pkg] = latest;
pkgs.combined.dependencies[pkg] = `0.0.0 - ${latest}`;
const file = path.join('addon_files/redmatic', dir, 'package.json')
await fs.writeFile(path.join(__dirname, 'package.json'), JSON.stringify(pkgs.combined, null, ' '));
await fs.writeFile(path.join(__dirname, file), JSON.stringify(pkgs[dir], null, ' '));
const {stdout, stderr} = await exec(`git commit package.json ${file} -m 'update ${pkg} to ${latest}'`);
const {stdout, stderr} = await exec(`git commit package.json ${file} -m 'update ${pkg} ${actual} to ${latest}'`);
console.log(stderr, stdout);
updateCount += 1;
}
Expand Down

0 comments on commit cd3c731

Please sign in to comment.