You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
756 B

  1. #!/bin/bash
  2. ../..
  3. #Update the release version of the project
  4. #version string will look similar to this: 0.1.0-DEV-27-060aec7
  5. VERSION=$(head -1 ./version.info)
  6. #do work on the version to get the correct info
  7. #we need the version string from above to look like this: 0.1.1-DEV
  8. IFS='.' read -a arr <<< "$VERSION"
  9. #results in [0,1,0-DEV-27-060aec7]
  10. IFS='-' read -a arr2 <<< "${arr[2]}"
  11. #results in [0,DEV,27,060aec7]
  12. MVERSIONTEMP=0
  13. #determine the milestone version
  14. if [ "${arr2[1]:0:1}" = "M" ]
  15. then
  16. MVERSIONTEMP=${arr2[1]:1}
  17. fi
  18. #increment the milestone vesrion
  19. let MVERSION=${MVERSIONTEMP}+1
  20. VERSION="${arr[0]}.${arr[1]}.${arr2[0]}-M$MVERSION"
  21. echo $VERSION
  22. #update the POM
  23. mvn versions:set -DnewVersion=$VERSION
  24. echo "$VERSION" > version.info