Skip to content

Commit

Permalink
ci: fix undefined sha in canary releases
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Feb 5, 2022
1 parent ea82c8c commit e0802e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/canary.yaml
Expand Up @@ -49,14 +49,14 @@ jobs:
const packageJSONPath = './npmDist/package.json';
const packageJSON = JSON.parse(fs.readFileSync(packageJSONPath, 'utf-8'));
const { sha, pull_request } = JSON.parse(fs.readFileSync('./event.json', 'utf-8'));
const { pull_request } = JSON.parse(fs.readFileSync('./event.json', 'utf-8'));
// Override entire 'publishConfig' since it can contain untrusted data.
packageJSON.publishConfig = { tag: `canary-pr-${pull_request.number}` };
assert(!packageJSON.version.includes('+'), 'Can not append after metadata');
packageJSON.version += packageJSON.version.includes('-') ? '.' : '-';
packageJSON.version += `canary.pr.${pull_request.number}.${sha}`;
packageJSON.version += `canary.pr.${pull_request.number}.${pull_request.head.sha}`;
assert(
packageJSON.scripts == null,
Expand Down

0 comments on commit e0802e1

Please sign in to comment.