forked from e-mission/e-mission-phone
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request e-mission#954 from shankari/upgrade_serve
Upgrade the "serve" deployment also to the latest
- Loading branch information
Showing
3 changed files
with
49 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
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,38 @@ | ||
'use strict'; | ||
const os = require('os'); | ||
|
||
const nameMap = new Map([ | ||
[22, ['Ventura', '13']], | ||
[21, ['Monterey', '12']], | ||
[20, ['Big Sur', '11']], | ||
[19, ['Catalina', '10.15']], | ||
[18, ['Mojave', '10.14']], | ||
[17, ['High Sierra', '10.13']], | ||
[16, ['Sierra', '10.12']], | ||
[15, ['El Capitan', '10.11']], | ||
[14, ['Yosemite', '10.10']], | ||
[13, ['Mavericks', '10.9']], | ||
[12, ['Mountain Lion', '10.8']], | ||
[11, ['Lion', '10.7']], | ||
[10, ['Snow Leopard', '10.6']], | ||
[9, ['Leopard', '10.5']], | ||
[8, ['Tiger', '10.4']], | ||
[7, ['Panther', '10.3']], | ||
[6, ['Jaguar', '10.2']], | ||
[5, ['Puma', '10.1']] | ||
]); | ||
|
||
const macosRelease = release => { | ||
release = Number((release || os.release()).split('.')[0]); | ||
|
||
const [name, version] = nameMap.get(release); | ||
|
||
return { | ||
name, | ||
version | ||
}; | ||
}; | ||
|
||
module.exports = macosRelease; | ||
// TODO: remove this in the next major version | ||
module.exports.default = macosRelease; |