Skip to content

Commit

Permalink
tmp workaround to generate release body
Browse files Browse the repository at this point in the history
  • Loading branch information
librelois committed Nov 13, 2023
1 parent fb79d31 commit ac6aee3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tools/github/github-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ export function getCompareLink(packageName: string, previousTag: string, newTag:
const previousCommit = /#([0-9a-f]*)/g.exec(previousPackage)[1].slice(0, 8);
const previousRepo = /(https:\/\/.*)\?/g.exec(previousPackage)[1];

const newPackage = execSync(
let newPackage;
try { newPackage = execSync(
`git show ${newTag}:../Cargo.lock | grep ${packageName}? | head -1 | grep -o '".*"'`
).toString();
).toString()}
catch {
newPackage = execSync(
`git show ${newTag}:../Cargo.lock | grep polkadot-sdk? | head -1 | grep -o '".*"'`
).toString()
};
const newCommit = /#([0-9a-f]*)/g.exec(newPackage)[1].slice(0, 8);
const newRepo = /(https:\/\/.*)\?/g.exec(newPackage)[1];
const newRepoOrganization = /github.com\/([^\/]*)/g.exec(newRepo)[1];
Expand Down

0 comments on commit ac6aee3

Please sign in to comment.