mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
ci: fix updating Chrome (#10382)
This commit is contained in:
parent
b332675974
commit
0d219c79de
2
.github/workflows/issue-analyzer.yml
vendored
2
.github/workflows/issue-analyzer.yml
vendored
@ -60,7 +60,7 @@ jobs:
|
||||
with:
|
||||
node-version: lts/*
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
run: npm ci
|
||||
- name: Analyze issue
|
||||
id: issue-analysis
|
||||
run: echo $ISSUE_BODY | ./tools/analyze_issue.mjs >> $GITHUB_OUTPUT
|
||||
|
5
.github/workflows/pre-release.yml
vendored
5
.github/workflows/pre-release.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
||||
with:
|
||||
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
run: npm ci
|
||||
- name: Build
|
||||
env:
|
||||
PUBLISH: 1
|
||||
@ -34,7 +34,7 @@ jobs:
|
||||
- name: Version docs
|
||||
working-directory: ./website
|
||||
run: |
|
||||
npm install
|
||||
npm ci
|
||||
npm run docusaurus docs:version $(jq -r .version ../packages/puppeteer/package.json)
|
||||
npm run archive
|
||||
- name: Re-build docs after versioning
|
||||
@ -44,6 +44,7 @@ jobs:
|
||||
npm run docs
|
||||
- name: Format
|
||||
run: npm run format
|
||||
# Release-please does not update the package-lock
|
||||
- name: Install to refresh package-lock
|
||||
run: npm install
|
||||
- name: Commit
|
||||
|
@ -110,23 +110,29 @@ async function updateDevToolsProtocolVersion(revision) {
|
||||
);
|
||||
}
|
||||
|
||||
async function updateVersionFileLastMaintained(currentVersion, updateVersion) {
|
||||
async function updateVersionFileLastMaintained(oldVersion, newVersion) {
|
||||
const versions = [...versionsPerRelease.keys()];
|
||||
if (versions.indexOf(updateVersion) !== -1) {
|
||||
if (versions.indexOf(newVersion) !== -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If we have manually rolled Chrome but not yet released
|
||||
// We will have NEXT as value in the Map
|
||||
if (versionsPerRelease.get(currentVersion) === 'NEXT') {
|
||||
await replaceInFile('./versions.js', currentVersion, updateVersion);
|
||||
} else {
|
||||
await replaceInFile(
|
||||
'./versions.js',
|
||||
VERSIONS_PER_RELEASE_COMMENT,
|
||||
`${VERSIONS_PER_RELEASE_COMMENT}\n ['${version}', 'NEXT'],`
|
||||
);
|
||||
if (versionsPerRelease.get(oldVersion) === 'NEXT') {
|
||||
await replaceInFile('./versions.js', oldVersion, newVersion);
|
||||
return;
|
||||
}
|
||||
|
||||
await replaceInFile(
|
||||
'./versions.js',
|
||||
VERSIONS_PER_RELEASE_COMMENT,
|
||||
`${VERSIONS_PER_RELEASE_COMMENT}\n ['${version}', 'NEXT'],`
|
||||
);
|
||||
|
||||
const oldSemVer = new SemVer(oldVersion, true);
|
||||
const newSemVer = new SemVer(newVersion, true);
|
||||
|
||||
if (newSemVer.compareMain(oldSemVer) !== 0) {
|
||||
const lastMaintainedIndex = versions.indexOf(lastMaintainedChromeVersion);
|
||||
const nextMaintainedVersion = versions[lastMaintainedIndex - 1];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user