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.
 
 
 
 

58 líneas
2.0 KiB

  1. #!/bin/bash
  2. #
  3. # Build Bubble distribution ZIP file
  4. #
  5. # Usage:
  6. #
  7. # build_dist [no-build]
  8. #
  9. # no-build : if present, do not rebuild the bubble jar file
  10. #
  11. # Environment variables
  12. #
  13. # BUBBLE_ENV : env file to load. Default is ~/.bubble.env or /home/bubble/current/bubble.env (whichever is found first)
  14. #
  15. SCRIPT="${0}"
  16. SCRIPT_DIR=$(cd $(dirname ${SCRIPT}) && pwd)
  17. . ${SCRIPT_DIR}/bubble_common
  18. NO_BUILD="${1}"
  19. BASE=$(cd $(dirname $0)/.. && pwd)
  20. cd ${BASE}
  21. if [[ -z "${NO_BUILD}" || "${NO_BUILD}" != "no-build" ]] ; then
  22. echo "Building bubble jar..."
  23. ${BASE}/bin/git_update_bubble.sh || die "Error building bubble jar file"
  24. else
  25. echo "Not building bubble jar: no-build was set"
  26. fi
  27. DIST_BASE="${BASE}/dist"
  28. rm -rf "${DIST_BASE}" || die "Error removing "${DIST_BASE}" directory"
  29. mkdir -p "${DIST_BASE}" || die "Error creating "${DIST_BASE}" directory"
  30. JAR_DIR="${BASE}/bubble-server/target"
  31. JAR="$(find "${JAR_DIR}" -type f -name "bubble-server-*.jar" | head -1)"
  32. if [[ -z "${JAR}" ]] ; then
  33. die "No bubble jar found in ${JAR_DIR}"
  34. fi
  35. VERSION_FILE="${BASE}/bubble-server/src/main/resources/META-INF/bubble/bubble.properties"
  36. VERSION=$(cat "${VERSION_FILE}" | grep bubble.version | awk -F '=' '{print $2}')
  37. if [[ -z "${VERSION}" ]] ; then
  38. die "No version found in ${VERSION_FILE}"
  39. fi
  40. DIST="${DIST_BASE}/bubble-${VERSION}"
  41. ZIP="${DIST_BASE}/bubble-${VERSION}.zip"
  42. mkdir -p "${DIST}" || die "Error creating distribution directory: ${DIST}"
  43. cp "${JAR}" "${DIST}/bubble.jar" || die "Error copying ${JAR} to ${DIST}/bubble.jar"
  44. cp "${BASE}/dist-README.md" "${DIST}/README.md" || die "Error copying dist-README.md to ${DIST}/README.md"
  45. cp -R "${BASE}/bin" "${DIST}" || die "Error copying bin directory to ${DIST}"
  46. cp -R "${BASE}/scripts" "${DIST}" || die "Error copying scripts directory to ${DIST}"
  47. cp -R "${BASE}/config" "${DIST}" || die "Error copying config directory to ${DIST}"
  48. cd "${DIST}/.." && zip -r "${ZIP}" "$(basename ${DIST})"
  49. echo "Distribution created: "
  50. ls -lh "${ZIP}"