Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update documentation on rolling chromium #6399

Merged
merged 2 commits into from Sep 8, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -269,6 +269,18 @@ See [Debugging Tips](README.md#debugging-tips) in the readme.

# For Project Maintainers

## Rolling new Chromium version

The following steps are needed to update the Chromium version.

1. Find a suitable Chromium revision
Not all revisions has builds for all platforms, so we need to find one that does.
johanbay marked this conversation as resolved.
Show resolved Hide resolved
To do so, run `utils/check_availability.js -rb` to find the latest suitable beta Chromium revision (see `utils/check_availability.js -help` for more options).
2. Update `src/revisions.ts` with the found revision number.
3. Run `npm run ensure-correct-devtools-protocol-revision`.
If it fails, update `package.json` with the expected `devtools-protoocol` version.
4. Run `npm run tsc` and `npm install` and ensure that all tests pass.
johanbay marked this conversation as resolved.
Show resolved Hide resolved

## Releasing to npm

Releasing to npm consists of the following phases:
Expand Down
32 changes: 20 additions & 12 deletions utils/check_availability.js
Expand Up @@ -60,7 +60,9 @@ Usage: node check_availability.js [<options>] [<browser version(s)>]

options
-f full mode checks availability of all the platforms, default mode
-r roll mode checks for the most recent Chromium roll candidate
-r roll mode checks for the most recent stable Chromium roll candidate
-rb roll mode checks for the most recent beta Chromium roll candidate
-rd roll mode checks for the most recent dev Chromium roll candidate
-h show this help

browser version(s)
Expand All @@ -71,8 +73,9 @@ Examples
To check Chromium availability of a certain revision
node check_availability.js [revision]

To find a Chromium roll candidate for current Stable Linux version
To find a Chromium roll candidate for current stable Linux version
node check_availability.js -r
use -rb for beta and -rd for dev versions.

To check Chromium availability from the latest revision in a descending order
node check_availability.js
Expand All @@ -97,7 +100,13 @@ function main() {
case 'f':
break;
case 'r':
checkRollCandidate();
checkRollCandidate('stable');
return;
case 'rb':
checkRollCandidate('beta');
return;
case 'rd':
checkRollCandidate('dev');
return;
default:
console.log(helpMessage);
Expand Down Expand Up @@ -148,19 +157,18 @@ async function checkOmahaProxyAvailability() {
stopWhenAllAvailable: false,
});
}

async function checkRollCandidate() {
async function checkRollCandidate(channel) {
const omahaResponse = await fetch(
'https://omahaproxy.appspot.com/all.json?channel=stable&os=linux'
`https://omahaproxy.appspot.com/all.json?channel=${channel}&os=linux`
);
const stableLinuxInfo = JSON.parse(omahaResponse)[0];
if (!stableLinuxInfo) {
console.error('no stable linux information available from omahaproxy');
const linuxInfo = JSON.parse(omahaResponse)[0];
if (!linuxInfo) {
console.error(`no ${channel} linux information available from omahaproxy`);
return;
}

const stableLinuxRevision = parseInt(
stableLinuxInfo.versions[0].branch_base_position,
const linuxRevision = parseInt(
linuxInfo.versions[0].branch_base_position,
10
);
const currentRevision = parseInt(
Expand All @@ -169,7 +177,7 @@ async function checkRollCandidate() {
);

checkRangeAvailability({
fromRevision: stableLinuxRevision,
fromRevision: linuxRevision,
toRevision: currentRevision,
stopWhenAllAvailable: true,
});
Expand Down