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.
 
 
 
 

38 rivejä
1.5 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. # Write a constant value to stdout.
  6. #
  7. # This will only ever write the constant value to stdout if it can successfully be read.
  8. # If the constant can be read, its value is printed with the .toString() method.
  9. # If an error occurs, nothing is written to stdout, and the error will be written to stderr.
  10. # If the value of the constant is null, nothing is printed to stdout, and "null" is printed to stderr.
  11. #
  12. # Usage:
  13. #
  14. # bconst classAndMember
  15. #
  16. # classAndMember : the full name of a Java class, followed by a dot and the constant member name
  17. #
  18. # For example:
  19. #
  20. # bconst bubble.ApiConstants.ROOT_NETWORK_UUID
  21. #
  22. # Environment variables
  23. #
  24. # BUBBLE_API : which API to use. Default is local (http://127.0.0.1:PORT, where PORT is found in .bubble.env)
  25. # BUBBLE_USER : account to use. Default is root@local.local
  26. # BUBBLE_PASS : password for account. Default is password
  27. # BUBBLE_INCLUDE : path to look for JSON include files. default value is to assume we are being run from
  28. # bubble repo, bubble-models repo, or bubble-client and use include files from minimal model.
  29. #
  30. SCRIPT="${0}"
  31. SCRIPT_DIR=$(cd $(dirname ${SCRIPT}) && pwd)
  32. . ${SCRIPT_DIR}/bubble_common
  33. CLASS_AND_MEMBER="${1:?sole param should be something like: bubble.pkg.SomeClass.SOME_CONSTANT}"
  34. shift
  35. BUBBLE_QUIET=1 exec ${SCRIPT_DIR}/bubble const "${CLASS_AND_MEMBER}" "${@}"