The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
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.
 
 
 
 

64 lines
1.7 KiB

  1. #!/bin/bash
  2. #
  3. # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
  4. #
  5. # Update repository from master, including submodules, and rebuild bubble jar file
  6. #
  7. # Usage:
  8. #
  9. # git_update_bubble.sh [fast]
  10. #
  11. # fast : if the first argument is 'fast', then don't perform "clean" builds for submodules, just repackage/reinstall them
  12. #
  13. function die {
  14. if [[ -z "${SCRIPT}" ]] ; then
  15. echo 1>&2 "${1}"
  16. else
  17. echo 1>&2 "${SCRIPT}: ${1}"
  18. fi
  19. exit 1
  20. }
  21. FAST=${1}
  22. if [[ -n "${FAST}" && "${FAST}" == "fast" ]] ; then
  23. FAST=1
  24. else
  25. FAST=0
  26. fi
  27. BASE=$(cd $(dirname $0)/.. && pwd)
  28. cd ${BASE}
  29. git fetch || die "Error calling git fetch"
  30. git pull origin master || die "Error calling git pull origin master"
  31. git submodule update --init --recursive || die "Error in git submodule update"
  32. pushd utils/cobbzilla-parent
  33. mvn install || die "Error installing cobbzilla-parent"
  34. popd
  35. UTIL_REPOS="
  36. cobbzilla-parent
  37. cobbzilla-utils
  38. templated-mail-sender
  39. cobbzilla-wizard
  40. abp-parser
  41. "
  42. pushd utils
  43. MVN_QUIET="-q -DskipTests=true -Dcheckstyle.skip=true"
  44. for repo in ${UTIL_REPOS} ; do
  45. if [[ ${FAST} -eq 1 ]] ; then
  46. pushd ${repo} && mvn ${MVN_QUIET} install && popd || die "Error installing ${repo}"
  47. else
  48. pushd ${repo} && mvn ${MVN_QUIET} clean install && popd || die "Error installing ${repo}"
  49. fi
  50. done
  51. popd
  52. if [[ ${FAST} -eq 1 ]] ; then
  53. mvn ${MVN_QUIET} clean package || die "Error building bubble jar"
  54. else
  55. BUBBLE_PRODUCTION=1 mvn ${MVN_QUIET} -Pproduction clean package || die "Error building bubble jar"
  56. BUBBLE_PRODUCTION=1 mvn ${MVN_QUIET} -Pproduction-full package || die "Error building bubble full jar"
  57. fi