git-directory-deploy
git-directory-deploy copied to clipboard
"Deploy directory 'dist' is empty" but it isn't
I just grabbed the latest version of your script and I got this issue. It guess the script need to be at the same level of dist?
~/Sync/Development/statinamic/demo master* ⇡
❯ ./scripts/deploy.sh
Deploy directory 'dist' is empty. Aborting. If you're sure you want to deploy an empty tree, use the --allow-empty / -e flag.
~/Sync/Development/statinamic/demo master* ⇡
❯❯ ls dist
collection.json docs index.html index.json statinamic-client.css statinamic-client.js
I opened the script to try to fix that and saw ls --almost-all
~/Sync/Development/statinamic/demo master* ⇡
❯❯ ls --almost-all dist
ls: illegal option -- -
What am I doing wrong? (OS X 10.11.1)
Not sure why this option is not working for me. I changed the syntax to ls -A and it is working now. Maybe you should do the same in your script?
ok, it seems the ls on OS X is from BSD and doesn't support long options. so i should:
- [x] revert to using the short form of the option,
-A - [ ] make sure errors in command substitutions / conditionals are propagated properly
- [x] see if i can have my CI run tests on OS X or BSD, too
great plan!