File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 88 ELECTRON_SKIP_BINARY_DOWNLOAD : 1
99 BROWSER : ${{ github.event.client_payload.browser }}
1010 REVISION : ${{ github.event.client_payload.revision }}
11+ BROWSER_VERSION : ${{ github.event.client_payload.browserVersion }}
1112
1213permissions :
1314 contents : write
2930 run : npx playwright install-deps
3031 - name : Roll to new revision
3132 run : |
32- ./utils/roll_browser.js $BROWSER $REVISION
33+ ./utils/roll_browser.js $BROWSER $REVISION $BROWSER_VERSION
3334 npm run build
3435 - name : Prepare branch
3536 id : prepare-branch
Original file line number Diff line number Diff line change @@ -71,7 +71,11 @@ Example:
7171 }
7272
7373 const revision = args [ 1 ] ;
74+ let browserVersion = args [ 2 ] ;
7475 console . log ( `Rolling ${ browserName } to ${ revision } ` ) ;
76+ if ( browserVersion ) {
77+ console . log ( `Browser version: ${ browserVersion } ` ) ;
78+ }
7579
7680 // 2. Update browser revisions in browsers.json.
7781 console . log ( '\nUpdating revision in browsers.json...' ) ;
@@ -88,11 +92,13 @@ Example:
8892 // 4. Update browser version if rolling WebKit / Firefox / Chromium.
8993 const browserType = playwright [ browserName . split ( '-' ) [ 0 ] ] ;
9094 if ( browserType ) {
91- const browser = await browserType . launch ( {
92- executablePath : executable . executablePath ( 'javascript' ) ,
93- } ) ;
94- const browserVersion = await browser . version ( ) ;
95- await browser . close ( ) ;
95+ if ( ! browserVersion ) {
96+ const browser = await browserType . launch ( {
97+ executablePath : executable . executablePath ( 'javascript' ) ,
98+ } ) ;
99+ browserVersion = await browser . version ( ) ;
100+ await browser . close ( ) ;
101+ }
96102 console . log ( '\nUpdating browser version in browsers.json...' ) ;
97103 for ( const descriptor of descriptors )
98104 descriptor . browserVersion = browserVersion ;
You can’t perform that action at this time.
0 commit comments