I have an automatic build script for my build server that builds Android applications. As part of this building process, I need to increment two parameters in one of the Android application files after the build and commit this file into the Git repository.
So I have to build the following bash script:
#!/bin/bash
clear
echo "Start of Pull command"
git pull
echo "End of Pull command"
echo "Start of incrementedRelease build"
gradle incrementedRelease
echo "End of incrementedRelease build"
echo "Start of Commit command"
git commit -a -m "======================== Commit to change Manifest Version ======================"
echo "End of Commit command"
echo "Start of Push command"
git push
echo "End of Push command"
Now, the issue is that instead of creating a commit with the name:
Commit to change Manifest Version
I want to pass the current application version.
For I have created a version.txt file that contains the current version that will be released,
I want in the process of the build for it to get the value from this file and put it as part of the commit name, as well as update this file automatically with the next version for the next commit.