3

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
ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
udo
  • 4,832
  • 4
  • 54
  • 82

1 Answers1

4

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"
ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257