Skip to content

Commit ac6aee3

Browse files
committed
tmp workaround to generate release body
1 parent fb79d31 commit ac6aee3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tools/github/github-utils.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,15 @@ export function getCompareLink(packageName: string, previousTag: string, newTag:
1212
const previousCommit = /#([0-9a-f]*)/g.exec(previousPackage)[1].slice(0, 8);
1313
const previousRepo = /(https:\/\/.*)\?/g.exec(previousPackage)[1];
1414

15-
const newPackage = execSync(
15+
let newPackage;
16+
try { newPackage = execSync(
1617
`git show ${newTag}:../Cargo.lock | grep ${packageName}? | head -1 | grep -o '".*"'`
17-
).toString();
18+
).toString()}
19+
catch {
20+
newPackage = execSync(
21+
`git show ${newTag}:../Cargo.lock | grep polkadot-sdk? | head -1 | grep -o '".*"'`
22+
).toString()
23+
};
1824
const newCommit = /#([0-9a-f]*)/g.exec(newPackage)[1].slice(0, 8);
1925
const newRepo = /(https:\/\/.*)\?/g.exec(newPackage)[1];
2026
const newRepoOrganization = /github.com\/([^\/]*)/g.exec(newRepo)[1];

0 commit comments

Comments
 (0)