Skip to content

Commit

Permalink
Merge pull request e-mission#954 from shankari/upgrade_serve
Browse files Browse the repository at this point in the history
Upgrade the "serve" deployment also to the latest
  • Loading branch information
shankari authored Apr 23, 2023
2 parents dfc4eb2 + 235b157 commit ee4904d
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 4 deletions.
1 change: 1 addition & 0 deletions bin/setup_autodeploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ cp $SRC_DIR/middleware.js $INSTALL_DIR/lib/middleware.js
cp $SRC_DIR/nocache.js $INSTALL_DIR/lib/middleware/nocache.js
cp $SRC_DIR/lib_autoreload.js $INSTALL_DIR/lib/middleware/autoreload.js
cp $SRC_DIR/res_autoreload.js $INSTALL_DIR/res/middleware/autoreload.js
cp $SRC_DIR/macos-index.js $INSTALL_DIR/../macos-release/index.js
echo "Finished copying files from $SRC_DIR to $INSTALL_DIR"
14 changes: 10 additions & 4 deletions package.serve.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@
},
"devDependencies": {
"phonegap": "9.0.0+cordova.9.0.0",
"cordova": "9.0.0",
"@ionic/cli": "6.10.1",
"bower": "1.8.8"
"cordova": "^11.1.0",
"@ionic/cli": "6.20.8",
"bower": "1.8.14"
},
"dependencies": {
"fs-extra": "^9.0.1",
"klaw-sync": "^6.0.0"
"klaw-sync": "^6.0.0",
"shelljs": "^0.8.5"
},
"cordova": {
"platforms": [
"browser"
]
}
}
38 changes: 38 additions & 0 deletions setup/autoreload/macos-index.js
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;

0 comments on commit ee4904d

Please sign in to comment.