So, I have an Xcode Server bot with an trigger. This trigger is a pre integration script.
#!/bin/sh
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PROJECT_DIR}/${INFOPLIST_FILE}")
num=1
buildNumber=$(($buildNumber+$num))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}"
With that I get the error in the log:
/var/folders/_j/vm2y6jt90ws0ntn4q8wd6cxm0000gn/T/F5295D82-1E7A-4FFC-B097-140389AECF5E-19235-000011B88EB40E5E: line 4: Error Reading File: /+1: syntax error in expression (error token is "Reading File: /+1")
But I'm confused because there is no "+1" in the script. I really don't have too much experience with shell script. I have tried other ways of adding the variables like
((buildNumber=buildNumber+num))
((buildNumber+=num))
But none of those 2 work either.
If I remove the script the integration succeeds. And also this same script works when using to increment on the scheme settings post action of build.
Any help is welcome and if you need anymore info please ask!