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:
|
with:
|
||||||
node-version: lts/*
|
node-version: lts/*
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm install
|
run: npm ci
|
||||||
- name: Analyze issue
|
- name: Analyze issue
|
||||||
id: issue-analysis
|
id: issue-analysis
|
||||||
run: echo $ISSUE_BODY | ./tools/analyze_issue.mjs >> $GITHUB_OUTPUT
|
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:
|
with:
|
||||||
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm install
|
run: npm ci
|
||||||
- name: Build
|
- name: Build
|
||||||
env:
|
env:
|
||||||
PUBLISH: 1
|
PUBLISH: 1
|
||||||
@ -34,7 +34,7 @@ jobs:
|
|||||||
- name: Version docs
|
- name: Version docs
|
||||||
working-directory: ./website
|
working-directory: ./website
|
||||||
run: |
|
run: |
|
||||||
npm install
|
npm ci
|
||||||
npm run docusaurus docs:version $(jq -r .version ../packages/puppeteer/package.json)
|
npm run docusaurus docs:version $(jq -r .version ../packages/puppeteer/package.json)
|
||||||
npm run archive
|
npm run archive
|
||||||
- name: Re-build docs after versioning
|
- name: Re-build docs after versioning
|
||||||
@ -44,6 +44,7 @@ jobs:
|
|||||||
npm run docs
|
npm run docs
|
||||||
- name: Format
|
- name: Format
|
||||||
run: npm run format
|
run: npm run format
|
||||||
|
# Release-please does not update the package-lock
|
||||||
- name: Install to refresh package-lock
|
- name: Install to refresh package-lock
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: Commit
|
- name: Commit
|
||||||
|
@ -110,23 +110,29 @@ async function updateDevToolsProtocolVersion(revision) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function updateVersionFileLastMaintained(currentVersion, updateVersion) {
|
async function updateVersionFileLastMaintained(oldVersion, newVersion) {
|
||||||
const versions = [...versionsPerRelease.keys()];
|
const versions = [...versionsPerRelease.keys()];
|
||||||
if (versions.indexOf(updateVersion) !== -1) {
|
if (versions.indexOf(newVersion) !== -1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we have manually rolled Chrome but not yet released
|
// If we have manually rolled Chrome but not yet released
|
||||||
// We will have NEXT as value in the Map
|
// We will have NEXT as value in the Map
|
||||||
if (versionsPerRelease.get(currentVersion) === 'NEXT') {
|
if (versionsPerRelease.get(oldVersion) === 'NEXT') {
|
||||||
await replaceInFile('./versions.js', currentVersion, updateVersion);
|
await replaceInFile('./versions.js', oldVersion, newVersion);
|
||||||
} else {
|
return;
|
||||||
await replaceInFile(
|
}
|
||||||
'./versions.js',
|
|
||||||
VERSIONS_PER_RELEASE_COMMENT,
|
|
||||||
`${VERSIONS_PER_RELEASE_COMMENT}\n ['${version}', 'NEXT'],`
|
|
||||||
);
|
|
||||||
|
|
||||||
|
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 lastMaintainedIndex = versions.indexOf(lastMaintainedChromeVersion);
|
||||||
const nextMaintainedVersion = versions[lastMaintainedIndex - 1];
|
const nextMaintainedVersion = versions[lastMaintainedIndex - 1];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user