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

Better messages for upload errors #60

Closed xiam closed 8 years ago

xiam commented 8 years ago

Had something like this:

  config:
    upload:
      - src: ./etc/foo.$FOO.conf
        dst: /tmp/

The ./etc/foo.$FOO.conf file didn't exist, sup tried to upload it anyway and that ended up on a remote tar error which was misleading.

Can sup alert and stop in case the src file does not exists?

eduardonunesp commented 8 years ago

It can be done by a local check before upload by sup (but is not implemented, I thinky) or by another command which runs before the upload, for instance, you can set a command to check if ./etc/foo.$FOO.conf exists, if file not exists you can abort by return something different from 0.

 config:
  checkfile:
    run: test -e ./etc/foo.$FOO.conf
  upload:
    - src: ./etc/foo.$FOO.conf
      dst: /tmp/