calcium

module
v0.0.0-...-afd2ce5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2019 License: MIT

README

calcium

This is task runner inspired by Makefile

Installation

# Please set $GOPATH
$ go get -u github.com/NasSilverBullet/calcium/cmd/ca

Usage

# Please create calcium.yml on your working directory
$ cat calcium.yml
version: 1

tasks:

  - task:
    use: test1
    run: |
      echo test

  - task:
    use: test2
    flags:
      - name: value
        short: v
        long: val
        description: for echo value

      - name: secondvalue
        short: sv
        long: secval
        description: for echo second value

    run: |
      echo {{value}}
      echo {{secondvalue}}

# call task: test1
$ ca run test1
test # echo test

# call task: test2
$ ca run test2 -v foo -sv bar
foo # echo {{value}} => echo foo
bar # echo {{secondvalue}} => echo bar

# call faild task: test2
$ ca run test2 -v foo
Error:
Missing flags: [secondvalue]

Usage:
  ca run test2 [flags]

Flags:
  -v,  --val      for echo value
  -sv, --secval   for echo second value

License

MIT License. See LICENSE.txt for more information.

Directories

Path Synopsis
cmd
ca command
cli
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL