I followed article
to configure to run a script during release step.
unfortunately the release results in the following error (Release Log):
/bin/sh: 1: ./release-tasks.sh: Permission denied
how can I fix this?
my Procfile
:
release: ./release-tasks.sh
web: gunicorn ph.wsgi --preload --log-file -
release-tasks.sh
(simplified):
#!/bin/bash
python manage.py migrate --noinput
Git ignores most file permissions, but it does track the executable bit. Make your script executable and check it in, e.g.
chmod +x release-tasks.sh
git add release-tasks.sh
git commit -m "Make release-tasks.sh executable"
Then deploy as normal.
On Windows, you won't have chmod
. Use the --chmod
option to git add
instead:
git add --chmod=+x release-tasks.sh
git commit -m "Make release-tasks.sh executable"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With