Skip to content

Commit

Permalink
migrate do github, help fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
paramah committed Dec 1, 2021
1 parent 7f099a4 commit 7f29c13
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 15 deletions.
4 changes: 2 additions & 2 deletions app/cmd/autocomplete.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var CmdAutocomplete = cli.Command{
Name: "shellcompletion",
Aliases: []string{"autocomplete"},
Category: catSetup,
Usage: "Install shell completion for ledo",
Usage: "install shell completion",
Description: "Install shell completion for ledo",
ArgsUsage: "<shell type> (bash, zsh, powershell, fish)",
Flags: []cli.Flag{
Expand Down Expand Up @@ -84,7 +84,7 @@ func runAutocompleteAdd(ctx *cli.Context) error {
}

func writeRemoteAutoCompleteFile(file, destPath string) error {
url := fmt.Sprintf("https://git.cynarski.pl/LeDo/ledo/raw/branch/master/%s", file)
url := fmt.Sprintf("https://raw.githubusercontent.com/paramah/ledo/master/%s", file)
fmt.Println("Fetching " + url)

res, err := http.Get(url)
Expand Down
4 changes: 2 additions & 2 deletions app/cmd/image/fqn.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package image
import (
"fmt"
"github.com/urfave/cli/v2"
"ledo/app/modules/docker"
"ledo/app/modules/context"
"ledo/app/modules/docker"
)

var CmdDockerFqn = cli.Command{
Name: "fqn",
Aliases: []string{"f"},
Usage: "Docker image fqn",
Usage: "docker image fqn",
Description: `Get fqn docker image defined as main service in config file`,
Action: RunDockerFqn,
}
Expand Down
5 changes: 3 additions & 2 deletions app/cmd/init.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cmd

import (
"fmt"
"github.com/urfave/cli/v2"
"html/template"
"ledo/app/helper"
Expand All @@ -16,7 +17,7 @@ import (
var CmdInit = cli.Command{
Name: "init",
Category: catSetup,
Usage: "Init ledo in project",
Usage: "init ledo in project",
Description: `Initialize LeadDocker in current project`,
Action: runInitLedo,
}
Expand All @@ -25,7 +26,7 @@ func runInitLedo(cmd *cli.Context) error {
var advRun bool
config, err := context.LoadConfigFile()
if err != nil {
return err
fmt.Printf("Ledo config file not found!")
}

data, err := interact.InitLedoProject(config.Docker)
Expand Down
30 changes: 21 additions & 9 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func main() {
app := cli.NewApp()
compose.CheckDockerComposeVersion()
app.Name = "ledo"
app.Usage = "LeadDocker helper for docker-compose work"
app.Usage = "docker-compose and docker workflow improvement tool"
app.Description = appDescription
app.CustomAppHelpTemplate = helpTemplate
app.Version = GetCurrentVersion()
Expand All @@ -44,7 +44,16 @@ func main() {
}
}

var appDescription = `LeadDocker (ledo) docker-compose project helper
var appDescription = `LeadDocker (ledo) is a simple tool for improve docker anddocker-compose workflow in your project.
What you can do with this tool:
=> create and manage docker-compose workflow in a project
=> build docker image for project (automatic fqn and docker registry)
=> login to the docker registry (with AWS ECR support)
LeadDocker is helpful in a continuous methodologies.
If you want use it as a docker service, try dind image: https://hub.docker.com/r/paramah/dind
Enjoy (-_-)
`

var helpTemplate = bold(`
Expand All @@ -53,7 +62,7 @@ var helpTemplate = bold(`
| |__/ -_) _' / _' | |) / _ \/ _| / / -_) '_|
|____\___\__,_\__,_|___/\___/\__|_\_\___|_| {{.Version}}
{{.Name}}{{if .Usage}} - {{.Usage}}{{end}}`) + `
{{.Name}}{{if .Usage}} - {{.Usage}}{{end}}`) + `
USAGE
{{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}}{{if .Commands}} command [subcommand] [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Description}}
Expand All @@ -71,16 +80,19 @@ var helpTemplate = bold(`
{{end}}{{$option}}{{end}}{{end}}
EXAMPLES
ledo init # init ledo in project
ledo init # init ledo in your project
ledo docker ps # print list of docker containers
ABOUT
Written & maintained by Aleksander "paramah" Cynarski
Thanks for StreamSage Team (https://streamsage.io)
More info about ledo on https://leaddocker.tech
`
Written & maintained by Aleksander "paramah" Cynarski
More info about ledo on https://leaddocker.tech
`+bold(`
Thanks for:
StreamSage Team https://streamsage.io
Jazzy Innovations Team https://jazzy.pro
`)+"\n"

func bold(t string) string {
return fmt.Sprintf("\033[1m%s\033[0m", t)
Expand Down

0 comments on commit 7f29c13

Please sign in to comment.