mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-06 00:41:39 +08:00
ci: skip generating changelog if prev commit is not found (#8045)
This commit is contained in:
@@ -89,8 +89,16 @@ const content = await readFile(join(rootDir, pkgJsonPath), 'utf8');
|
|||||||
const { dependencies } = JSON.parse(content);
|
const { dependencies } = JSON.parse(content);
|
||||||
const blocksuiteVersion = dependencies['@blocksuite/block-std'];
|
const blocksuiteVersion = dependencies['@blocksuite/block-std'];
|
||||||
|
|
||||||
const previousPkgJsonBlob = repo
|
const prevCommit = repo.findCommit(PREV_VERSION);
|
||||||
.findCommit(PREV_VERSION)
|
|
||||||
|
if (!prevCommit) {
|
||||||
|
console.info(
|
||||||
|
`Can't find prev commit ${PREV_VERSION} on the git tree, skip the changelog generation`
|
||||||
|
);
|
||||||
|
process.exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
const previousPkgJsonBlob = prevCommit
|
||||||
.tree()
|
.tree()
|
||||||
.getPath(pkgJsonPath)
|
.getPath(pkgJsonPath)
|
||||||
.toObject(repo)
|
.toObject(repo)
|
||||||
|
|||||||
Reference in New Issue
Block a user