chore: fix deprecate command (#8000)

This commit is contained in:
Alex Rudenko 2022-02-11 07:32:27 +01:00 committed by GitHub
parent 55c38a25c8
commit 7e2b47c974
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -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}}

View File

@ -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);