mirror of
https://github.com/aljazceru/cyphernode.git
synced 2025-12-26 09:05:13 +01:00
added installation mode selection
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
const name = 'installer';
|
||||
const chalk = require('chalk');
|
||||
|
||||
const installerDocker = function(props) {
|
||||
return props.installer === 'docker'
|
||||
};
|
||||
|
||||
const installerLunanode = function(props) {
|
||||
return props.installer === 'lunanode'
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
name: function() {
|
||||
return name;
|
||||
},
|
||||
prompts: function( utils ) {
|
||||
return [{
|
||||
type: 'list',
|
||||
name: 'installer',
|
||||
default: utils._getDefault( 'installer' ),
|
||||
message: chalk.red('Where do you want to install cyphernode?')+'\n',
|
||||
choices: [{
|
||||
name: "Local docker",
|
||||
value: "docker"
|
||||
},{
|
||||
name: "Lunanode",
|
||||
value: "lunanode"
|
||||
}]
|
||||
},
|
||||
{
|
||||
when: installerDocker,
|
||||
type: 'confirm',
|
||||
name: 'installer_confirm_docker',
|
||||
default: utils._getDefault( 'installer_confirm_docker' ),
|
||||
message: 'Docker?! Really?'+'\n'
|
||||
},
|
||||
{
|
||||
when: installerLunanode,
|
||||
type: 'confirm',
|
||||
name: 'installer_confirm_docker',
|
||||
default: utils._getDefault( 'installer_confirm_docker' ),
|
||||
message: 'Lunanode?! No wayyyy!'+'\n'
|
||||
}
|
||||
];
|
||||
},
|
||||
templates: function( props ) {
|
||||
return [];
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user