Show a warning when using wrong executable
This commit updates the 'wdcli' command to show a warning when using the wrong executable.
This commit is contained in:
parent
c4de1f2a06
commit
35bb95c5ca
29 changed files with 176 additions and 30 deletions
|
|
@ -25,7 +25,7 @@ type backup struct {
|
|||
func (backup) Description() wisski_distillery.Description {
|
||||
return wisski_distillery.Description{
|
||||
Requirements: env.Requirements{
|
||||
NeedsConfig: true,
|
||||
NeedsDistillery: true,
|
||||
},
|
||||
Command: "backup",
|
||||
Description: "Makes a backup of the entire distillery",
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ type blindUpdate struct {
|
|||
func (blindUpdate) Description() wisski_distillery.Description {
|
||||
return wisski_distillery.Description{
|
||||
Requirements: env.Requirements{
|
||||
NeedsConfig: true,
|
||||
NeedsDistillery: true,
|
||||
},
|
||||
Command: "blind_update",
|
||||
Description: "Runs the blind update in the provided instances",
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ type bootstrap struct {
|
|||
func (bootstrap) Description() wisski_distillery.Description {
|
||||
return wisski_distillery.Description{
|
||||
Requirements: env.Requirements{
|
||||
NeedsConfig: false,
|
||||
NeedsDistillery: false,
|
||||
},
|
||||
Command: "bootstrap",
|
||||
Description: "Bootstraps the installation of a Distillery System",
|
||||
|
|
@ -92,8 +92,8 @@ func (bs bootstrap) Run(context wisski_distillery.Context) error {
|
|||
}
|
||||
|
||||
// TODO: Read these from the command line?
|
||||
wdcliPath := filepath.Join(root, "wdcli")
|
||||
envPath := filepath.Join(root, ".env")
|
||||
wdcliPath := filepath.Join(root, env.Executable)
|
||||
envPath := filepath.Join(root, env.ConfigFile)
|
||||
domain := bs.Hostname
|
||||
if domain == "" {
|
||||
domain = hostname.FQDN()
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ type config struct {
|
|||
func (s config) Description() wisski_distillery.Description {
|
||||
return wisski_distillery.Description{
|
||||
Requirements: env.Requirements{
|
||||
NeedsConfig: true,
|
||||
NeedsDistillery: true,
|
||||
},
|
||||
Command: "config",
|
||||
Description: "Prints information about configuration",
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ type cron struct {
|
|||
func (cron) Description() wisski_distillery.Description {
|
||||
return wisski_distillery.Description{
|
||||
Requirements: env.Requirements{
|
||||
NeedsConfig: true,
|
||||
NeedsDistillery: true,
|
||||
},
|
||||
Command: "cron",
|
||||
Description: "Runs the cron script for several instances",
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ type info struct {
|
|||
func (info) Description() wisski_distillery.Description {
|
||||
return wisski_distillery.Description{
|
||||
Requirements: env.Requirements{
|
||||
NeedsConfig: true,
|
||||
NeedsDistillery: true,
|
||||
},
|
||||
Command: "info",
|
||||
Description: "Provide information about a single repository",
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ type license struct{}
|
|||
func (license) Description() wisski_distillery.Description {
|
||||
return wisski_distillery.Description{
|
||||
Requirements: env.Requirements{
|
||||
NeedsConfig: false,
|
||||
NeedsDistillery: false,
|
||||
},
|
||||
Command: "license",
|
||||
Description: "Print licensing information about wdcli and exit. ",
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ type ls struct {
|
|||
func (ls) Description() wisski_distillery.Description {
|
||||
return wisski_distillery.Description{
|
||||
Requirements: env.Requirements{
|
||||
NeedsConfig: true,
|
||||
NeedsDistillery: true,
|
||||
},
|
||||
Command: "ls",
|
||||
Description: "Lists WissKI instances",
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ type makeMysqlAccount struct{}
|
|||
func (makeMysqlAccount) Description() wisski_distillery.Description {
|
||||
return wisski_distillery.Description{
|
||||
Requirements: env.Requirements{
|
||||
NeedsConfig: true,
|
||||
NeedsDistillery: true,
|
||||
},
|
||||
ParserConfig: parser.Config{
|
||||
IncludeUnknown: true,
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ type monday struct {
|
|||
func (monday) Description() wisski_distillery.Description {
|
||||
return wisski_distillery.Description{
|
||||
Requirements: env.Requirements{
|
||||
NeedsConfig: true,
|
||||
NeedsDistillery: true,
|
||||
},
|
||||
Command: "monday",
|
||||
Description: "Runs regular monday tasks",
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ type mysql struct {
|
|||
func (mysql) Description() wisski_distillery.Description {
|
||||
return wisski_distillery.Description{
|
||||
Requirements: env.Requirements{
|
||||
NeedsConfig: true,
|
||||
NeedsDistillery: true,
|
||||
},
|
||||
ParserConfig: parser.Config{
|
||||
IncludeUnknown: true,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ type provision struct {
|
|||
func (provision) Description() wisski_distillery.Description {
|
||||
return wisski_distillery.Description{
|
||||
Requirements: env.Requirements{
|
||||
NeedsConfig: true,
|
||||
NeedsDistillery: true,
|
||||
},
|
||||
Command: "provision",
|
||||
Description: "Creates a new WissKI Instance",
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ type purge struct {
|
|||
func (purge) Description() wisski_distillery.Description {
|
||||
return wisski_distillery.Description{
|
||||
Requirements: env.Requirements{
|
||||
NeedsConfig: true,
|
||||
NeedsDistillery: true,
|
||||
},
|
||||
Command: "purge",
|
||||
Description: "Purges a WissKI Instance",
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ type rebuild struct {
|
|||
func (rebuild) Description() wisski_distillery.Description {
|
||||
return wisski_distillery.Description{
|
||||
Requirements: env.Requirements{
|
||||
NeedsConfig: true,
|
||||
NeedsDistillery: true,
|
||||
},
|
||||
Command: "rebuild",
|
||||
Description: "Runs the rebuild script for several instances",
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ type reserve struct {
|
|||
func (reserve) Description() wisski_distillery.Description {
|
||||
return wisski_distillery.Description{
|
||||
Requirements: env.Requirements{
|
||||
NeedsConfig: true,
|
||||
NeedsDistillery: true,
|
||||
},
|
||||
Command: "reserve",
|
||||
Description: "Reserves a new WissKI Instance",
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ type shell struct {
|
|||
func (shell) Description() wisski_distillery.Description {
|
||||
return wisski_distillery.Description{
|
||||
Requirements: env.Requirements{
|
||||
NeedsConfig: true,
|
||||
NeedsDistillery: true,
|
||||
},
|
||||
ParserConfig: parser.Config{
|
||||
IncludeUnknown: true,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ type snapshot struct {
|
|||
func (snapshot) Description() wisski_distillery.Description {
|
||||
return wisski_distillery.Description{
|
||||
Requirements: env.Requirements{
|
||||
NeedsConfig: true,
|
||||
NeedsDistillery: true,
|
||||
},
|
||||
Command: "snapshot",
|
||||
Description: "Generates a snapshot archive for the provided archive",
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ type systemupdate struct {
|
|||
func (systemupdate) Description() wisski_distillery.Description {
|
||||
return wisski_distillery.Description{
|
||||
Requirements: env.Requirements{
|
||||
NeedsConfig: true,
|
||||
NeedsDistillery: true,
|
||||
},
|
||||
ParserConfig: parser.Config{
|
||||
IncludeUnknown: true,
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ type updateprefixconfig struct{}
|
|||
func (updateprefixconfig) Description() wisski_distillery.Description {
|
||||
return wisski_distillery.Description{
|
||||
Requirements: env.Requirements{
|
||||
NeedsConfig: true,
|
||||
NeedsDistillery: true,
|
||||
},
|
||||
Command: "update_prefix_config",
|
||||
Description: "Updates the prefix configuration",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue