aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/common-utils/bin/devcontainer-info10
-rw-r--r--src/common-utils/main.sh2
2 files changed, 10 insertions, 2 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
diff --git a/src/common-utils/main.sh b/src/common-utils/main.sh
index f0fedcf..6b1df8a 100644
--- a/src/common-utils/main.sh
+++ b/src/common-utils/main.sh
@@ -477,7 +477,7 @@ if [ "${ADJUSTED_ID}" = "debian" ]; then
fi
# Persist image metadata info, script if meta.env found in same directory
-if [ -f "/usr/local/etc/vscode-dev-containers/meta.env" ]; then
+if [ -f "/usr/local/etc/vscode-dev-containers/meta.env" ] || [ -f "/usr/local/etc/dev-containers/meta.env" ]; then
cp -f "${FEATURE_DIR}/bin/devcontainer-info" /usr/local/bin/devcontainer-info
chmod +x /usr/local/bin/devcontainer-info
fi