2

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
Chris
  • 112,704
  • 77
  • 249
  • 231
udo
  • 4,302
  • 4
  • 49
  • 74

1 Answers1

3

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"
Chris
  • 112,704
  • 77
  • 249
  • 231