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.

33 lines
864 B

  1. #!/bin/bash
  2. HOME=$PWD
  3. cd ../..
  4. #Update the release version of the project
  5. #version string will look similar to this: 0.1.0-DEV-27-060aec7
  6. VERSION=$(head -1 ./version.info)
  7. #do work on the version to get the correct info
  8. #we need the version string from above to look like this: 0.1.1-DEV
  9. IFS='.' read -a arr <<< "$VERSION"
  10. #results in [0,1,0-DEV-27-060aec7]
  11. IFS='-' read -a arr2 <<< "${arr[2]}"
  12. #results in [0,DEV,27,060aec7]
  13. let minor=${arr[1]}+1
  14. #echo $minor
  15. VERSION="${arr[0]}.$minor.0-${arr2[1]}"
  16. #echo $VERSION
  17. #update the POM
  18. mvn versions:set -DnewVersion=$VERSION
  19. #Build the new version and make the necessary changes
  20. cd $HOME
  21. . createBuildRelease.sh
  22. #commit the new patch version
  23. git commit -a -m "Creating minor version $VERSION"
  24. #tag the build
  25. git tag -a v$VERSION -m "Minor Release Version $VERSION"
  26. #push the build and tag
  27. git push --follow-tags