pressly / sup

Super simple deployment tool - think of it like 'make' for a network of servers
https://pressly.github.io/sup
MIT License
2.48k stars 178 forks source link

target call target, display "Unknown command/target" #98

Open andares opened 7 years ago

andares commented 7 years ago
$ 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
VojtechVitek commented 7 years ago

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

Ref. #31.

andares commented 7 years ago

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