fix/release-workflow-issues #19

Merged
david merged 4 commits from fix/release-workflow-issues into main 2026-04-01 06:31:23 +00:00
Showing only changes of commit fe133eab99 - Show all commits
+10 -2
View File
@@ -48,14 +48,22 @@ function getCommitsSinceLastTag() {
if (!latestTag) {
// No tags yet, get all commits
return execSync('git log --oneline --format=%s', { encoding: 'utf8' }).trim().split('\n');
const commits = execSync('git log --oneline --format=%s', { encoding: 'utf8' }).trim();
return commits ? commits.split('\n') : [];
}
const commits = execSync(`git log ${latestTag}..HEAD --oneline --format=%s`, { encoding: 'utf8' }).trim();
return commits ? commits.split('\n') : [];
} catch (error) {
// If no commits since tag or other error, get recent commits
return execSync('git log --oneline --format=%s -n 20', { encoding: 'utf8' }).trim().split('\n');
try {
const commits = execSync('git log --oneline --format=%s -n 20', { encoding: 'utf8' }).trim();
return commits ? commits.split('\n') : [];
} catch (innerError) {
// If all git log attempts fail, return empty array
console.warn('Warning: Could not retrieve commit history, defaulting to patch version');
return [];
}
}
}