Skip to content

Commit cd3c731

Browse files
committed
show old version in git commit msg
1 parent 851c064 commit cd3c731

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

update_dependencies.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@ async function compareVersions(dir) {
2727

2828
const actual = dependencies[pkg];
2929
const latest = json.body['dist-tags'].latest;
30-
if (dependencies[pkg] !== latest) {
30+
if (actual !== latest) {
3131
const response = await prompts({
3232
type: 'confirm',
3333
name: 'confirmed',
34-
message: `update ${pkg} ${dependencies[pkg]} to ${latest}?`
34+
message: `update ${pkg} ${actual} to ${latest}?`
3535
});
3636
if (response.confirmed) {
3737
dependencies[pkg] = latest;
3838
pkgs.combined.dependencies[pkg] = `0.0.0 - ${latest}`;
3939
const file = path.join('addon_files/redmatic', dir, 'package.json')
4040
await fs.writeFile(path.join(__dirname, 'package.json'), JSON.stringify(pkgs.combined, null, ' '));
4141
await fs.writeFile(path.join(__dirname, file), JSON.stringify(pkgs[dir], null, ' '));
42-
const {stdout, stderr} = await exec(`git commit package.json ${file} -m 'update ${pkg} to ${latest}'`);
42+
const {stdout, stderr} = await exec(`git commit package.json ${file} -m 'update ${pkg} ${actual} to ${latest}'`);
4343
console.log(stderr, stdout);
4444
updateCount += 1;
4545
}

0 commit comments

Comments
 (0)