mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-10-08 10:15:14 +08:00
create package with hash
This commit is contained in:
@@ -21,22 +21,9 @@ const commands = {
|
||||
help: printUsage,
|
||||
};
|
||||
|
||||
function translateOptions(options){
|
||||
for (let key in options) {
|
||||
const v = options[key];
|
||||
if (typeof(v) === 'string') {
|
||||
options[key] = v.replace(/\$\{(\w+)\}/, function (v, n){
|
||||
return options[n] || process.env[n] || v;
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exports.run = function () {
|
||||
const argv = require('cli-arguments').parse(require('../cli.json'));
|
||||
|
||||
translateOptions(argv.options);
|
||||
|
||||
loadSession()
|
||||
.then(()=>commands[argv.command](argv))
|
||||
.catch(err=>{
|
||||
|
Reference in New Issue
Block a user