sup icon indicating copy to clipboard operation
sup copied to clipboard

target call target, display "Unknown command/target"

Open andares opened this issue 8 years ago • 2 comments

$ sup -f elk.yml local install
Targets:   
- java     start date
- install  java add-key

Commands:  
- start    Print some env vars
- date     Print OS name and current date/time
- add-key  add apt key

Unknown command/target: java

how does it work?

supfile content like:

commands:
    start:
        desc: Print some env vars
        run: echo \>\>\> start run for $SUP_NETWORK
    date:
        desc: Print OS name and current date/time
        run: uname -a; date
    add-key:
        desc: add apt key
        run: wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

targets:
    java:
        - start
        - date
    install:
        - java
        - add-key

andares avatar Oct 13 '16 06:10 andares

So, target calls another target. Cool. The only problem would be circular dependency, we'd need a proper check.

Ref. #31.

VojtechVitek avatar Oct 13 '16 14:10 VojtechVitek

Yes, I think it will be useful. try to do it :-D

andares avatar Oct 13 '16 16:10 andares