The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 

84 líneas
3.2 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. # Performs first-time setup after a fresh git clone.
  6. # Checks out submodules and performs initial build.
  7. #
  8. # Before from running this script, if you want to run the Bubble Server, install dependencies
  9. # with the first_time_ubuntu.sh script. If you're running something other than Ubuntu (18.04 or 20.04),
  10. # please add a first_time_<your-OS>.sh in this directory.
  11. #
  12. # If you're going to run the Bubble Server, you will also need
  13. # Create environment files: ~/.bubble.env and ~/.bubble-test.env (one can be a symlink to the other)
  14. #
  15. # ~/.bubble.env is the environment used by the BubbleServer started by run.sh
  16. # ~/.bubble-test.env is the environment used by the BubbleServer that runs during the integration tests
  17. #
  18. # If you prefer to checkout git submodules using SSH instead of HTTPS, set the BUBBLE_SSH_SUBMODULES
  19. # environment variable to 'true'
  20. #
  21. # Environment Variables
  22. #
  23. # SKIP_BUBBLE_BUILD : if set to 1, then everything will be built except for the bubble jar
  24. #
  25. # BUBBLE_SETUP_MODE : only used if SKIP_BUBBLE_BUILD is not set. values are:
  26. # debug - build the bubble jar without including the website
  27. # web - build the bubble jar, including the website
  28. # production - build the bubble jar and the bubble full jar, both including the website
  29. #
  30. function die() {
  31. if [[ -z "${SCRIPT}" ]] ; then
  32. echo 1>&2 "${1}"
  33. else
  34. echo 1>&2 "${SCRIPT}: ${1}"
  35. fi
  36. exit 1
  37. }
  38. BASE="$(cd "$(dirname "${0}")/.." && pwd)"
  39. cd "${BASE}" || die "Error changing to ${BASE} directory"
  40. if [[ -z "${BUBBLE_SSH_SUBMODULES}" || "${BUBBLE_SSH_SUBMODULES}" != "true" ]] ; then
  41. "${BASE}"/bin/git_https_submodules.sh || die "Error switching to HTTPS git submodules"
  42. fi
  43. git submodule update --init --recursive || die "Error in git submodule update"
  44. pushd utils/cobbzilla-parent || die "Error pushing utils/cobbzilla-parent directory"
  45. mvn -q install || die "Error installing cobbzilla-parent"
  46. popd || die "Error popping back from utils/cobbzilla-parent"
  47. UTIL_REPOS="
  48. cobbzilla-parent
  49. cobbzilla-utils
  50. templated-mail-sender
  51. cobbzilla-wizard
  52. abp-parser
  53. "
  54. pushd utils || die "Error pushing utils directory"
  55. MVN_QUIET="-q -DskipTests=true -Dcheckstyle.skip=true"
  56. for repo in ${UTIL_REPOS}; do
  57. pushd "${repo}" && mvn ${MVN_QUIET} clean install && popd || die "Error installing ${repo}"
  58. done
  59. popd || die "Error popping back from utils directory"
  60. if [[ -n "${SKIP_BUBBLE_BUILD}" && "${SKIP_BUBBLE_BUILD}" == "1" ]] ; then
  61. exit 0
  62. fi
  63. if [[ -z "${BUBBLE_SETUP_MODE}" || "${BUBBLE_SETUP_MODE}" == "web" ]] ; then
  64. INSTALL_WEB=web mvn ${MVN_QUIET} -Pproduction clean package || die "Error building bubble jar"
  65. elif [[ "${BUBBLE_SETUP_MODE}" == "debug" ]] ; then
  66. DEBUG_BUILD=debug mvn ${MVN_QUIET} -Pproduction clean package || die "Error building bubble jar"
  67. elif [[ "${BUBBLE_SETUP_MODE}" == "production" ]] ; then
  68. BUBBLE_PRODUCTION=1 mvn ${MVN_QUIET} -Pproduction clean package || die "Error building bubble jar"
  69. BUBBLE_PRODUCTION=1 mvn ${MVN_QUIET} -Pproduction-full package || die "Error building bubble full jar"
  70. else
  71. die "env var BUBBLE_SETUP_MODE was invalid: ${BUBBLE_SETUP_MODE}"
  72. fi