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.
 
 
 
 

63 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. for repo in ${UTIL_REPOS} ; do
  44. if [[ ${FAST} -eq 1 ]] ; then
  45. pushd ${repo} && mvn -DskipTests=true -Dcheckstyle.skip=true install && popd || die "Error installing ${repo}"
  46. else
  47. pushd ${repo} && mvn -DskipTests=true -Dcheckstyle.skip=true clean install && popd || die "Error installing ${repo}"
  48. fi
  49. done
  50. popd
  51. if [[ ${FAST} -eq 1 ]] ; then
  52. mvn -DskipTests=true -Dcheckstyle.skip=true clean package || die "Error building bubble jar"
  53. else
  54. BUBBLE_PRODUCTION=1 mvn -DskipTests=true -Dcheckstyle.skip=true -Pproduction clean package || die "Error building bubble jar"
  55. BUBBLE_PRODUCTION=1 mvn -DskipTests=true -Dcheckstyle.skip=true -Pproduction-full package || die "Error building bubble full jar"
  56. fi