The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

71 linhas
2.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. # 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. function die() {
  22. if [[ -z "${SCRIPT}" ]] ; then
  23. echo 1>&2 "${1}"
  24. else
  25. echo 1>&2 "${SCRIPT}: ${1}"
  26. fi
  27. exit 1
  28. }
  29. BASE="$(cd "$(dirname "${0}")/.." && pwd)"
  30. cd "${BASE}" || die "Error changing to ${BASE} directory"
  31. if [[ -z "${BUBBLE_SSH_SUBMODULES}" || "${BUBBLE_SSH_SUBMODULES}" != "true" ]] ; then
  32. "${BASE}"/bin/git_https_submodules.sh || die "Error switching to HTTPS git submodules"
  33. fi
  34. git submodule update --init --recursive || die "Error in git submodule update"
  35. pushd utils/cobbzilla-parent || die "Error pushing utils/cobbzilla-parent directory"
  36. mvn -q install || die "Error installing cobbzilla-parent"
  37. popd || die "Error popping back from utils/cobbzilla-parent"
  38. UTIL_REPOS="
  39. cobbzilla-parent
  40. cobbzilla-utils
  41. templated-mail-sender
  42. cobbzilla-wizard
  43. abp-parser
  44. "
  45. pushd utils || die "Error pushing utils directory"
  46. MVN_QUIET="-q -DskipTests=true -Dcheckstyle.skip=true"
  47. for repo in ${UTIL_REPOS}; do
  48. pushd "${repo}" && mvn ${MVN_QUIET} clean install && popd || die "Error installing ${repo}"
  49. done
  50. popd || die "Error popping back from utils directory"
  51. if [[ -z "${BUBBLE_SETUP_MODE}" || "${BUBBLE_SETUP_MODE}" == "web" ]] ; then
  52. INSTALL_WEB=web mvn ${MVN_QUIET} -Pproduction clean package || die "Error building bubble jar"
  53. elif [[ "${BUBBLE_SETUP_MODE}" == "debug" ]] ; then
  54. DEBUG_BUILD=debug mvn ${MVN_QUIET} -Pproduction clean package || die "Error building bubble jar"
  55. elif [[ "${BUBBLE_SETUP_MODE}" == "production" ]] ; then
  56. BUBBLE_PRODUCTION=1 mvn ${MVN_QUIET} -Pproduction clean package || die "Error building bubble jar"
  57. BUBBLE_PRODUCTION=1 mvn ${MVN_QUIET} -Pproduction-full package || die "Error building bubble full jar"
  58. else
  59. die "env var BUBBLE_SETUP_MODE was invalid: ${BUBBLE_SETUP_MODE}"
  60. fi