So I've been setting up an automated build for some embedded code I'm working on, the final stage of the build process (for each built hex file) is a step where curl uploads it to the downloads page of the Bitbucket repo, I have the same step working in 2 other repositories and in the previous steps for another hex file in the same repo/config file. What could be causing this error to come up?
+ curl -X POST --user "${BB_AUTH_STRING}" "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"../release/rdmIntergratedDriver-$(git describe --long --tags --always --dirty)-$(git rev-parse --abbrev-ref HEAD | cut -f 1- -d/ | sed "s/\//-/").hex
bash: /opt/atlassian/pipelines/agent/tmp/bashScript7120016009615084851.sh: line 39: syntax error near unexpected token `('
Here's an example from earlier in the same build where another hex file is uploaded successfully:
+ curl -X POST --user "${BB_AUTH_STRING}" "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"../release/D48-controller-$(git describe --long --tags --always --dirty)-$(git rev-parse --abbrev-ref HEAD | cut -f 1- -d/ | sed "s/\//-/").hex"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 105k 0 0 100 105k 0 443k --:--:-- --:--:-- --:--:-- 443k