It is kind of tedious things to just increment your version every time your fixes or updates are ready to be tested.
So I look up some scripts on the giant Internet and found this. The problem is, the script is written to be run by placing it as Run Script on the Build Phase. Since we use xcodebuild and Shenzhen to automate things we need the script to be run along other scripts.
So I modified it a little:
Then I save it in my root project directory and run it before making an ipa build.
Notice that it will increment the last digit on the build. From here, you can modify the script above to update all plist files which contain bundle version on your other targets in your project.
Then from here, you can make build with Shenzhen:
ipa build --verbose
and push it to itunesconnect
or other build distribution services supported.