attempt to get version info in frontend w/ burnettk

This commit is contained in:
jasquat 2023-04-07 16:30:44 -04:00
parent 0f57eb1529
commit 02b33d35e7
No known key found for this signature in database
4 changed files with 12 additions and 0 deletions

View File

@ -39,4 +39,6 @@ COPY --from=setup /app/build /app/build
COPY --from=setup /app/bin /app/bin COPY --from=setup /app/bin /app/bin
COPY --from=setup /app/node_modules.justserve /app/node_modules COPY --from=setup /app/node_modules.justserve /app/node_modules
ENV REACT_APP_VERSION_INFO="123"
ENTRYPOINT ["/app/bin/boot_server_in_docker"] ENTRYPOINT ["/app/bin/boot_server_in_docker"]

View File

@ -7,6 +7,11 @@ function error_handler() {
trap 'error_handler ${LINENO} $?' ERR trap 'error_handler ${LINENO} $?' ERR
set -o errtrace -o errexit -o nounset -o pipefail set -o errtrace -o errexit -o nounset -o pipefail
if [[ -f app_version.json ]]; then
SPIFFWORKFLOW_FRONTEND_RUNTIME_CONFIG_REACT_APP_VERSION_INFO_JSON=$(cat app_version.json)
export SPIFFWORKFLOW_FRONTEND_RUNTIME_CONFIG_REACT_APP_VERSION_INFO_JSON
fi
# sort of like https://lithic.tech/blog/2020-05/react-dynamic-config, but without golang # sort of like https://lithic.tech/blog/2020-05/react-dynamic-config, but without golang
react_configs=$(env | grep -E "^SPIFFWORKFLOW_FRONTEND_RUNTIME_CONFIG_" || echo '') react_configs=$(env | grep -E "^SPIFFWORKFLOW_FRONTEND_RUNTIME_CONFIG_" || echo '')
if [[ -n "$react_configs" ]]; then if [[ -n "$react_configs" ]]; then

View File

@ -5,6 +5,7 @@
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" /> <meta name="theme-color" content="#000000" />
<meta name="version-info" content="%REACT_APP_VERSION_INFO%" />
<meta <meta
name="description" name="description"
content="A turnkey solution for building and executing the workflows that drive your business" content="A turnkey solution for building and executing the workflows that drive your business"

View File

@ -83,6 +83,10 @@ export default function ProcessModelShow() {
); );
useEffect(() => { useEffect(() => {
console.log(
'process.env.REACT_APP_VERSION_INFO',
process.env.REACT_APP_VERSION_INFO
);
const processResult = (result: ProcessModel) => { const processResult = (result: ProcessModel) => {
setProcessModel(result); setProcessModel(result);
setReloadModel(false); setReloadModel(false);