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.

release.template 2.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #!/bin/bash
  2. #
  3. # ${project.version} release script
  4. #
  5. # ensure Maven repository is up-to-date
  6. echo ""
  7. echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
  8. echo "Preparing Maven repository"
  9. echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
  10. echo ""
  11. cd ${maven.directory}
  12. git checkout gh-pages
  13. git pull
  14. cd ${project.directory}
  15. # go back one commit to RELEASE commit
  16. echo ""
  17. echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
  18. echo "Checking out ${project.version} RELEASE commit ${project.commitId}"
  19. echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
  20. echo ""
  21. git checkout ${project.commitId}
  22. # build RELEASE artifacts
  23. echo ""
  24. echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
  25. echo "Building ${project.version} RELEASE artifacts"
  26. echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
  27. echo ""
  28. ant clean buildAll buildMavenArtifacts
  29. # commit all generated artifacts and metadata
  30. echo ""
  31. echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
  32. echo "Committing Maven repository ${project.version} RELEASE artifacts"
  33. echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
  34. echo ""
  35. cd ${maven.directory}
  36. git add .
  37. git commit -m "${project.version} artifacts"
  38. cd ${project.directory}
  39. # upload artifacts
  40. echo ""
  41. echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
  42. echo "Uploading ${project.version} artifacts"
  43. echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
  44. echo ""
  45. ant publishBinaries
  46. # build site, update gh-pages, and ftp upload site to hosting provider
  47. echo ""
  48. echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
  49. echo "Building ${project.version} website"
  50. echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
  51. echo ""
  52. ant publishSite
  53. # merge to master
  54. echo ""
  55. echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
  56. echo "Updating build identifier for next release cycle"
  57. echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
  58. echo ""
  59. git checkout master
  60. ant nextPointReleaseCycle
  61. # push Maven repository to origin
  62. echo ""
  63. echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
  64. echo "Pushing Maven repository"
  65. echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
  66. echo ""
  67. cd ${maven.directory}
  68. git push origin gh-pages
  69. cd ${project.directory}
  70. # push project branches
  71. echo ""
  72. echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
  73. echo "Pushing master, gh-pages, and tag ${project.tag}"
  74. echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
  75. echo ""
  76. git push origin master gh-pages ${project.tag}