-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99b449d
commit a41513c
Showing
2 changed files
with
51 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const fs = require('fs') | ||
|
||
/** | ||
* from root of directory run: | ||
* node ./scripts/browser-versions.js | ||
* to get stable chrome version, or: | ||
* node ./scripts/browser-versions.js beta | ||
* get get beta chrome version | ||
*/ | ||
const getVersion = () => { | ||
// file path is relative to repo root | ||
const currentBrowserVersions = JSON.parse(fs.readFileSync('./browser-versions.json')) | ||
|
||
const betaVersion = currentBrowserVersions['chrome:beta'] | ||
const stableVersion = currentBrowserVersions['chrome:stable'] | ||
|
||
if (process.argv.includes('beta')) { | ||
console.log(betaVersion) | ||
} else { | ||
console.log(stableVersion) | ||
} | ||
} | ||
|
||
module.exports = { | ||
getVersion, | ||
} | ||
|
||
getVersion() |