Skip to content

Commit bfe9e92

Browse files
mempkoclaude
andcommitted
Fix release script to skip commit when version is unchanged
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9104cf6 commit bfe9e92

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

release.mjs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,13 @@ pkg.version = version;
4242
writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
4343
console.log(`Version: ${oldVersion}${version}`);
4444

45-
// Commit, tag, push
46-
run('git add package.json');
47-
run(`git commit -m "Release v${version}"`);
45+
// Commit only if version actually changed
46+
if (oldVersion !== version) {
47+
run('git add package.json');
48+
run(`git commit -m "Release v${version}"`);
49+
}
50+
51+
// Tag and push
4852
run(`git tag -a "v${version}" -m "v${version}"`);
4953
run('git push');
5054
run('git push --tags');

0 commit comments

Comments
 (0)