Download file on build

Hi, we want to integrate with the localization service. The task is - when any changes are pushed to staging branch and deploy is triggered in the netlify, json file with text should be uploaded to localization service using http post request.
So, I tried to add bash script and run it for staging:
Bash Script:

curl -X POST -H "Content-Type: application/json" -d @src/locales/en.json


  command = "./"

But deploy fails with message:

6:14:38 PM: Executing user command: ./
6:14:38 PM: /usr/local/bin/build: line 45: ./ Permission denied

Could you please advise the correct way, how can we achieve this goal? Thanks in advance!

Git doesn’t always do a great job with permissions, and trying to run a non-executable shell script won’t work. Try this pattern instead:

chmod a+x ./ && ./

or maybe:

sh ./

to be sure :slight_smile: