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.

19 lines
565 B

  1. #!/bin/bash
  2. cd ../..
  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. VERSION="${arr[0]}.${arr[1]}.${arr2[0]}-DEV"
  13. #echo $VERSION
  14. #update the POM
  15. mvn versions:set -DnewVersion=$VERSION
  16. echo "$VERSION" > version.info