From 04bb2dab8cb79c087779aa536b95af8cf7498f3c Mon Sep 17 00:00:00 2001 From: Andrew Rynhard Date: Wed, 17 Oct 2018 09:06:22 -0700 Subject: [PATCH] fix(image): align VERSION env var with pkg/version (#168) --- src/image/.conform.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/image/.conform.yaml b/src/image/.conform.yaml index 0c5047dc1..00f06c1ab 100644 --- a/src/image/.conform.yaml +++ b/src/image/.conform.yaml @@ -64,7 +64,11 @@ tasks: COPY src/packer.json /packer.json COPY src/entrypoint.sh /bin/entrypoint.sh RUN chmod +x /bin/entrypoint.sh - ENV VERSION {{ .Docker.Image.Tag }} + {{ if .Git.IsTag }} + ENV VERSION {{ .Git.Tag }} + {{ else }} + ENV VERSION {{ .Git.SHA }} + {{ end }} ENTRYPOINT ["entrypoint.sh"] rootfs: template: |