because js apps like to obfuscate things in .js files this will extract the info into useable json:
TAG=1.5-182
TAG=1.6-76
TAG=1.7-6
podman run -it --rm --entrypoint /bin/bash --user root -v .:/host-mount quay.io/rhdh/rhdh-hub-rhel9:$TAG -c \
'grep -H -R "RHDH Metadata" /opt/app-root/src/packages/app/dist/static/ | tr "," "\n" | grep Upstream -A2 -B2 | \
sed -r -e "s/$/,/" -e "s/\}.\),//" -e s/"\"(N|card)\"://"' \
| jq -c . | jq
gets
[
"RHDH Version: 1.5.2",
"Backstage Version: 1.35.1",
"Upstream: https://github.com/redhat-developer/rhdh/tree/release-1.5 @ 252b1171",
"Midstream: https://gitlab.cee.redhat.com/rhidp/rhdh/-/commits/rhdh-1.5-rhel-9 @ 750ab35b",
"Build Time: 2025-04-04T12:49:35Z"
]
OR
{
"RHDH Version": "1.6.0",
"Backstage Version": "1.36.1",
"Upstream": "https://github.com/redhat-developer/rhdh/tree/release-1.6 @ a5fc5ab6",
"Midstream": "https://gitlab.cee.redhat.com/rhidp/rhdh/-/commits/rhdh-1.6-rhel-9 @ 9efe3ff8",
"Build Time": "2025-04-03T21:05:31Z"
}
If container is already running, execute this at the console:
grep -H -R "RHDH Metadata" /opt/app-root/src/packages/app/dist/static/ | tr "," "\n" | grep Upstream -A2 -B2 | \
sed -r -e "s/$/,/" -e "s/\}.\),//" -e s/"\"(N|card)\"://"
Or without pulling the image, use skopeo to get the upstream branch+commit and downstream branch: