From 00c83d575cbd67e11691f4168681d9baeadfaa46 Mon Sep 17 00:00:00 2001 From: ITViking Date: Thu, 9 Jan 2025 11:55:42 +0100 Subject: [PATCH 1/2] display dplsh version on start up --- tools/dplsh/dplsh.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/dplsh/dplsh.sh b/tools/dplsh/dplsh.sh index aeb18297..3ba5ceaf 100755 --- a/tools/dplsh/dplsh.sh +++ b/tools/dplsh/dplsh.sh @@ -223,6 +223,13 @@ if [[ -f "${HOME}/.gitconfig" ]] ; then GITCONFIG+=(-v "${HOME}/.gitconfig:/opt/.gitconfig-host:ro") fi +VERSION=$(docker inspect $CONTAINER_IMAGE | jq -r '.[0].Config.Labels["org.opencontainers.image.version"]') +if [ -n "$VERSION" ]; then + echo + echo "DPLSH VERSION: $VERSION" + echo +fi + docker run --hostname=dplsh \ --rm \ "${ADDITIONAL_ARGS[@]}" \ From 26a156e451877fdab404c79f06ff3ad64db46035 Mon Sep 17 00:00:00 2001 From: Philip Dein Date: Thu, 9 Jan 2025 11:59:56 +0100 Subject: [PATCH 2/2] Update tools/dplsh/dplsh.sh Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- tools/dplsh/dplsh.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/dplsh/dplsh.sh b/tools/dplsh/dplsh.sh index 3ba5ceaf..7e410c44 100755 --- a/tools/dplsh/dplsh.sh +++ b/tools/dplsh/dplsh.sh @@ -223,7 +223,7 @@ if [[ -f "${HOME}/.gitconfig" ]] ; then GITCONFIG+=(-v "${HOME}/.gitconfig:/opt/.gitconfig-host:ro") fi -VERSION=$(docker inspect $CONTAINER_IMAGE | jq -r '.[0].Config.Labels["org.opencontainers.image.version"]') +VERSION=$(docker inspect "$CONTAINER_IMAGE" | jq -r '.[0].Config.Labels["org.opencontainers.image.version"]') if [ -n "$VERSION" ]; then echo echo "DPLSH VERSION: $VERSION"