Skip to content

Commit

Permalink
feat: optimize readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Simon committed Jan 11, 2023
1 parent 4394e52 commit 9ee9153
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
22 changes: 18 additions & 4 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ COMMANDS:
init Crate a starter gomake.yml to current dir
ls List all commands described at gomake yaml file
run Run commands from gomake.yml file
srun Run commands from gomake.yml file but it run all commands are inside the given stage and run this in parallel
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
Expand Down Expand Up @@ -107,8 +108,13 @@ There is a [Dockerimage](https://hub.docker.com/r/fasibio/gomake)
You can use same stage for different commands

```
buildBin:
stage: build
color: "{{$root.Colors.purple}}"
script:
- echo build
buildDocker:
stage: stagename
stage: build
color: "{{$root.Colors.red}}"
script:
- docker build -t {{$root.Vars.dockername}}:{{$root.Vars.version}} -f {{$root.Vars.dockerfile}} .
Expand All @@ -118,12 +124,20 @@ buildDocker:
Now you can run by stagename instand of Command name with:

```
gomake srun stagename
gomake srun build
```

or show the result after template execution:

```
gomake srun --dry-run build
```

**Hint** Color can help you make it better to read at
**Hint**

Color can help you make it easier to read:

Possible Colors:
Possible Colors ({{.Colors.red}}):
- black
- red
- green
Expand Down
2 changes: 0 additions & 2 deletions command/include.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package command

import (
"fmt"
"log"
"text/template"
)

Expand All @@ -24,7 +23,6 @@ func (i *IncludeCommand) GetFuncMap() template.FuncMap {

func (i *IncludeCommand) Execute(cmd string, makefile MakeStruct, listType CommandListType) ([]string, error) {
if _, ok := makefile[cmd]; !ok {
log.Println(makefile)
return []string{}, fmt.Errorf("%s not exist, so can not include", cmd)
}
var list []string
Expand Down

0 comments on commit 9ee9153

Please sign in to comment.