forked from toolshed/abra
fix: flags for logging in
This commit is contained in:
@ -59,13 +59,15 @@ var CatalogueSkipList = map[string]bool{
|
||||
var catalogueGenerateCommand = &cli.Command{
|
||||
Name: "generate",
|
||||
Aliases: []string{"g"},
|
||||
Usage: "Generate a new copy of the catalogue",
|
||||
Usage: "Generate a new copy of the recipe catalogue",
|
||||
Flags: []cli.Flag{
|
||||
internal.PushFlag,
|
||||
internal.CommitFlag,
|
||||
internal.CommitMessageFlag,
|
||||
internal.DryFlag,
|
||||
internal.SkipUpdatesFlag,
|
||||
internal.RegistryUsernameFlag,
|
||||
internal.RegistryPasswordFlag,
|
||||
},
|
||||
Description: `
|
||||
This command generates a new copy of the recipe catalogue which can be found on:
|
||||
@ -73,8 +75,8 @@ This command generates a new copy of the recipe catalogue which can be found on:
|
||||
https://recipes.coopcloud.tech
|
||||
|
||||
It polls the entire git.coopcloud.tech/coop-cloud/... recipe repository
|
||||
listing, parses README and tags to produce recipe metadata and produces a
|
||||
apps.json file which is placed in your ~/.abra/catalogue/recipes.json.
|
||||
listing, parses README.md and git tags of those repositories to produce recipe
|
||||
metadata and produces a recipes JSON file.
|
||||
|
||||
It is possible to generate new metadata for a single recipe by passing
|
||||
<recipe>. The existing local catalogue will be updated, not overwritten.
|
||||
@ -84,6 +86,9 @@ A new catalogue copy can be published to the recipes repository by passing the
|
||||
|
||||
https://git.coopcloud.tech/coop-cloud/recipes
|
||||
|
||||
It is quite easy to get rate limited by Docker Hub when running this command.
|
||||
If you have a Hub account you can have Abra log you in to avoid this. Pass
|
||||
"--username" and "--password".
|
||||
`,
|
||||
ArgsUsage: "[<recipe>]",
|
||||
Action: func(c *cli.Context) error {
|
||||
@ -133,7 +138,11 @@ A new catalogue copy can be published to the recipes repository by passing the
|
||||
continue
|
||||
}
|
||||
|
||||
versions, err := catalogue.GetRecipeVersions(recipeMeta.Name)
|
||||
versions, err := catalogue.GetRecipeVersions(
|
||||
recipeMeta.Name,
|
||||
internal.RegistryUsername,
|
||||
internal.RegistryPassword,
|
||||
)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
@ -455,6 +455,26 @@ var SkipUpdatesFlag = &cli.BoolFlag{
|
||||
Destination: &SkipUpdates,
|
||||
}
|
||||
|
||||
var RegistryUsername string
|
||||
var RegistryUsernameFlag = &cli.StringFlag{
|
||||
Name: "username",
|
||||
Aliases: []string{"u"},
|
||||
Value: "",
|
||||
Usage: "Registry username",
|
||||
EnvVars: []string{"REGISTRY_USERNAME"},
|
||||
Destination: &RegistryUsername,
|
||||
}
|
||||
|
||||
var RegistryPassword string
|
||||
var RegistryPasswordFlag = &cli.StringFlag{
|
||||
Name: "password",
|
||||
Aliases: []string{"p"},
|
||||
Value: "",
|
||||
Usage: "Registry password",
|
||||
EnvVars: []string{"REGISTRY_PASSWORD"},
|
||||
Destination: &RegistryUsername,
|
||||
}
|
||||
|
||||
// SSHFailMsg is a hopefully helpful SSH failure message
|
||||
var SSHFailMsg = `
|
||||
Woops, Abra is unable to connect to connect to %s.
|
||||
|
Reference in New Issue
Block a user