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 npm publish
DEPRECATED_RANGE=$(node utils/get_deprecated_version_range.js) DEPRECATED_RANGE=$(node utils/get_deprecated_version_range.js)
echo "Deprecating old puppeteer versions: $DEPRECATED_RANGE" 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 - name: Publish puppeteer-core
env: env:
NPM_TOKEN: ${{secrets.NPM_TOKEN_PUPPETEER_CORE}} NPM_TOKEN: ${{secrets.NPM_TOKEN_PUPPETEER_CORE}}

View File

@ -18,10 +18,13 @@ const {
versionsPerRelease, versionsPerRelease,
lastMaintainedChromiumVersion, lastMaintainedChromiumVersion,
} = require('../versions.js'); } = require('../versions.js');
const version = versionsPerRelease.get(lastMaintainedChromiumVersion); let version = versionsPerRelease.get(lastMaintainedChromiumVersion);
if (version.toLowerCase() === 'next') { if (version.toLowerCase() === 'next') {
console.error('Unexpected NEXT Puppeteer version in versions.js'); console.error('Unexpected NEXT Puppeteer version in versions.js');
process.exit(1); process.exit(1);
} }
console.log('< ' + version); if (version.startsWith('v')) {
version = version.substring(1);
}
console.log('<' + version);
process.exit(0); process.exit(0);