win_installer.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/bin/bash
  2. set -e
  3. function usage() {
  4. echo "$0 [options] <tag> <certhash>"
  5. echo
  6. echo " tag : Release tag (eg: 2.1.4, 2.2-beta1, ...)"
  7. echo " certhash : SHA1 fingerprint of code-signing certificate"
  8. echo
  9. echo "Environment variables:"
  10. echo " SKIP_DOWNLOAD : Skips download of release artifacts"
  11. echo " SKIP_UPLOAD : Skips upload of mac installer"
  12. }
  13. tag=$1
  14. if [ -z $tag ]; then
  15. usage
  16. exit 1
  17. fi
  18. certhash=$2
  19. if [ -z $certhash ]; then
  20. usage
  21. exit 1
  22. fi
  23. # load properties
  24. . "$( cd "$( dirname "$0" )" && pwd )"/properties
  25. . "$( cd "$( dirname "$0" )" && pwd )"/win_properties
  26. # load common functions
  27. . "$( cd "$( dirname "$0" )" && pwd )"/functions
  28. # download and ready the artifacts
  29. setup_artifacts $tag win
  30. pushd tmp > /dev/null
  31. # move geoserver files into place
  32. mv geoserver-$tag/* .
  33. rmdir geoserver-$tag
  34. # create the exe
  35. "$NSIS_EXE" GeoServerEXE.nsi
  36. # code-sign exe
  37. ../code-sign-exe.sh $certhash geoserver-$tag.exe
  38. # upload exe to final location
  39. upload_installer $tag geoserver-$tag.exe
  40. popd > /dev/null
  41. exit 0