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.sh 835B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/bash
  2. #
  3. # script to create a jgit release
  4. # uncomment to switch on trace
  5. #set -x
  6. # abort if a command hits an error
  7. set -e
  8. export basePath=$(cd "$(dirname "$0")"; pwd)
  9. echo basePath $basePath
  10. if [ -z $1 ]; then
  11. echo "
  12. Usage:
  13. $ release.sh <release version tag>
  14. e.g. release.sh v3.4.0.201405051725-m7
  15. "
  16. exit
  17. fi
  18. # trimmed git status
  19. export status=$(git status --porcelain)
  20. if [ ! -z "$status" ];
  21. then
  22. echo "
  23. working tree is dirty -> can't create release
  24. "
  25. exit
  26. fi
  27. MSG="JGit $1"
  28. # tag release
  29. git tag -s -m "$MSG" $1
  30. # update version numbers
  31. ./tools/version.sh --release
  32. # commit changed version numbers
  33. git commit -a -s -m "$MSG"
  34. # move the tag to the version we release
  35. git tag -sf -m "$MSG" $1
  36. # run the build
  37. mvn clean install
  38. mvn clean install -f org.eclipse.jgit.packaging/pom.xml