-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fc9ee0a
Showing
6 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.idea/ | ||
vendor/*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
GO=go | ||
GOV=govendor | ||
GOINSTALL=$(GO) install | ||
GOCLEAN=$(GO) clean | ||
GOGET=$(GOV) fetch -v | ||
|
||
fetch: | ||
@$(GOGET) github.com/urfave/cli | ||
|
||
build: | ||
@echo "start building..." | ||
$(GOINSTALL) | ||
@echo "Yay! build DONE!" | ||
|
||
all: fetch build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
+-------+ ____ _ | ||
| || || | / ___|___ _ __ ___ _ __ ___ ___ ___(_) | ||
+---+---+---+---+ | | / _ \| '_ ` _ \| '_ \ / _ \/ __|/ _ \ | | ||
| || || | || || | | |__| (_) | | | | | | |_) | (_) \__ \ __/ | | ||
+-------+-------+ \____\___/|_| |_| |_| .__/ \___/|___/\___|_| | ||
|_| | ||
|
||
|
||
|
||
Composei is an interactive command line tool build with golang that helps you create your `docker-compose.yml` file. | ||
|
||
Cause yes I'm lazy to remember all the possible options for each container xD | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package commands | ||
|
||
import ( | ||
"github.com/urfave/cli" | ||
"fmt" | ||
) | ||
|
||
var GenerateCommand = cli.Command{ | ||
Name: "generate", | ||
Usage: "Generate docker-compose.yml file", | ||
Aliases: []string{"g"}, | ||
Action: generate, | ||
} | ||
|
||
func generate(c *cli.Context) { | ||
composei := ` | ||
+-------+ ____ _ | ||
| || || | / ___|___ _ __ ___ _ __ ___ ___ ___(_) | ||
+---+---+---+---+ | | / _ \| '_ ` + "`" + ` _ \| '_ \ / _ \/ __|/ _ \ | | ||
| || || | || || | | |__| (_) | | | | | | |_) | (_) \__ \ __/ | | ||
+-------+-------+ \____\___/|_| |_| |_| .__/ \___/|___/\___|_| | ||
|_| | ||
By Zakariae Filali - 0.0.1 | ||
https://github.com/kariae/composei | ||
` | ||
fmt.Println(composei) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"github.com/urfave/cli" | ||
"os" | ||
"github.com/kariae/composei/commands" | ||
) | ||
|
||
func main() { | ||
// Launch CLI | ||
app := cli.NewApp() | ||
|
||
app.Name = "Composei" | ||
app.Version = "0.0.1" | ||
app.Usage = "Composei is an interactive command line tool build with golang that helps you create your `docker-compose.yml` file." | ||
|
||
app.Commands = []cli.Command{ | ||
commands.GenerateCommand, | ||
} | ||
|
||
if err := app.Run(os.Args); err != nil { | ||
fmt.Fprintln(os.Stderr, err) | ||
os.Exit(1) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"comment": "", | ||
"ignore": "test", | ||
"package": [], | ||
"rootPath": "github.com/kariae/composei" | ||
} |