attempt to get version info in frontend w/ burnettk
This commit is contained in:
parent
0f57eb1529
commit
02b33d35e7
|
@ -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"]
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue