mirror of
https://github.com/toeverything/AFFiNE.git
synced 2025-01-03 19:23:37 +03:00
fix: bump blocksuite script changelog generate failed (#8708)
This commit is contained in:
parent
01228117e3
commit
c0d802a169
@ -25,6 +25,8 @@ const info = await fetch('https://registry.npmjs.org/@blocksuite/affine').then(
|
|||||||
|
|
||||||
const latestVersion = info['dist-tags'].latest;
|
const latestVersion = info['dist-tags'].latest;
|
||||||
const latestHash = latestVersion.split('-').pop();
|
const latestHash = latestVersion.split('-').pop();
|
||||||
|
const latestGitHead = info.versions[latestHash].gitHead;
|
||||||
|
const oldGitHead = info.versions[oldHash].gitHead;
|
||||||
|
|
||||||
if (oldHash === latestHash) {
|
if (oldHash === latestHash) {
|
||||||
console.info(chalk.greenBright('Already updated'));
|
console.info(chalk.greenBright('Already updated'));
|
||||||
@ -85,8 +87,6 @@ remote.fetch(
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
const latest = repo.findCommit(latestHash);
|
|
||||||
|
|
||||||
const commits = {
|
const commits = {
|
||||||
Features: [],
|
Features: [],
|
||||||
Bugfix: [],
|
Bugfix: [],
|
||||||
@ -94,11 +94,17 @@ const commits = {
|
|||||||
Misc: [],
|
Misc: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!latestGitHead) {
|
||||||
|
console.info('latestGitHead is not found');
|
||||||
|
console.info('Skip generating changelog');
|
||||||
|
process.exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
for (const oid of repo
|
for (const oid of repo
|
||||||
.revWalk()
|
.revWalk()
|
||||||
.push(latest.id())
|
.push(latestGitHead)
|
||||||
.setSorting(Sort.Time & Sort.Topological)) {
|
.setSorting(Sort.Time & Sort.Topological)) {
|
||||||
if (oid.startsWith(oldHash)) {
|
if (oid.startsWith(oldGitHead)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
const commit = repo.findCommit(oid);
|
const commit = repo.findCommit(oid);
|
||||||
|
Loading…
Reference in New Issue
Block a user