I am a beginner with BASH I am trying to automate the following process:
- get release version --> file "release"
- increase it
- save it again in the same file "release"
- git add all
- git commit "releaseX"
- git push
I will call this file releaseit.sh
for that I start with some code I got from: Extract version number from file in shell script
BASH:
read version < release
echo $version
echo ${version%.*}.$((${version##*.}+1))
How do I pass the last line to a variable and save it again into release file?
Desired result: if release contains 0.1.34 a new release file will contain 0.1.35 will be added committed and pushed.