Timoney, Dan (dt5972) | e8e914a | 2019-04-30 09:39:01 -0400 | [diff] [blame] | 1 | #! /bin/bash |
| 2 | |
| 3 | if [ $# -ne 1 ] |
| 4 | then |
| 5 | echo "Usage: $0 new-version" |
| 6 | exit 1 |
| 7 | fi |
| 8 | |
| 9 | |
| 10 | mvn versions:set versions:update-child-modules versions:commit -B -DnewVersion=$1 |
| 11 | |
| 12 | base_version=$(echo $1 | cut -d- -f1) |
| 13 | major=$(echo $base_version | cut -d. -f1) |
| 14 | minor=$(echo $base_version | cut -d. -f2) |
| 15 | patch=$(echo $base_version | cut -d. -f3) |
| 16 | |
| 17 | if [ -f version.properties ] |
| 18 | then |
| 19 | sed -i '' -e 's/\(release_name=\).*/\1'$major'/;s/\(sprint_number=\).*/\1'$minor'/;s/\(feature_revision=\).*/\1'$patch'/' version.properties |
| 20 | fi |