Last active
December 16, 2018 05:36
-
-
Save xcsrz/55b3651cfa0fc2c0deff2f26896e5879 to your computer and use it in GitHub Desktop.
Bash function to bump minor semantic version number by even numbers.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
releaseBumpValue() { | |
semver="${1}" | |
local tifs=${IFS} | |
local IFS='.' | |
read -ra bits <<< "${semver}" | |
if [ $((bits[1]%2)) -eq 0 ]; then | |
echo 2 | |
else | |
echo 1 | |
fi | |
IFS=${tifs} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment