aboutsummaryrefslogtreecommitdiff
path: root/src/common-utils/bin/devcontainer-info
diff options
context:
space:
mode:
Diffstat (limited to 'src/common-utils/bin/devcontainer-info')
-rwxr-xr-xsrc/common-utils/bin/devcontainer-info10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/common-utils/bin/devcontainer-info b/src/common-utils/bin/devcontainer-info
index 2c74fea..abbb682 100755
--- a/src/common-utils/bin/devcontainer-info
+++ b/src/common-utils/bin/devcontainer-info
@@ -1,5 +1,12 @@
#!/bin/sh
-. /usr/local/etc/vscode-dev-containers/meta.env
+
+# Load meta.env
+if [ -f "/usr/local/etc/vscode-dev-containers/meta.env" ]; then
+ . /usr/local/etc/vscode-dev-containers/meta.env
+fi
+if [ -f "/usr/local/etc/dev-containers/meta.env" ]; then
+ . /usr/local/etc/dev-containers/meta.env
+fi
# Minimal output
if [ "$1" = "version" ] || [ "$1" = "image-version" ]; then
@@ -22,6 +29,7 @@ if [ ! -z "${DEFINITION_ID}" ]; then echo "- Definition ID: ${DEFINITION_ID}"; f
if [ ! -z "${VARIANT}" ]; then echo "- Variant: ${VARIANT}"; fi
if [ ! -z "${GIT_REPOSITORY}" ]; then echo "- Source code repository: ${GIT_REPOSITORY}"; fi
if [ ! -z "${GIT_REPOSITORY_RELEASE}" ]; then echo "- Source code release/branch: ${GIT_REPOSITORY_RELEASE}"; fi
+if [ ! -z "${GIT_REPOSITORY_REVISION}" ]; then echo "- Source code revision: ${GIT_REPOSITORY_REVISION}"; fi
if [ ! -z "${BUILD_TIMESTAMP}" ]; then echo "- Timestamp: ${BUILD_TIMESTAMP}"; fi
if [ ! -z "${CONTENTS_URL}" ]; then echo && echo "More info: ${CONTENTS_URL}"; fi
echo