Skip to content

Commit

Permalink
chore: fix deprecate command (#8000)
Browse files Browse the repository at this point in the history
  • Loading branch information
OrKoN committed Feb 11, 2022
1 parent 55c38a2 commit 7e2b47c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-on-tag.yml
Expand Up @@ -25,7 +25,7 @@ jobs:
npm publish
DEPRECATED_RANGE=$(node utils/get_deprecated_version_range.js)
echo "Deprecating old puppeteer versions: $DEPRECATED_RANGE"
npm deprecate puppeteer@\"$DEPRECATED_RANGE\" "Version no longer supported. Upgrade to @latest"
npm deprecate puppeteer@$DEPRECATED_RANGE "Version no longer supported. Upgrade to @latest"
- name: Publish puppeteer-core
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN_PUPPETEER_CORE}}
Expand Down
7 changes: 5 additions & 2 deletions utils/get_deprecated_version_range.js
Expand Up @@ -18,10 +18,13 @@ const {
versionsPerRelease,
lastMaintainedChromiumVersion,
} = require('../versions.js');
const version = versionsPerRelease.get(lastMaintainedChromiumVersion);
let version = versionsPerRelease.get(lastMaintainedChromiumVersion);
if (version.toLowerCase() === 'next') {
console.error('Unexpected NEXT Puppeteer version in versions.js');
process.exit(1);
}
console.log('< ' + version);
if (version.startsWith('v')) {
version = version.substring(1);
}
console.log('<' + version);
process.exit(0);

0 comments on commit 7e2b47c

Please sign in to comment.