From f60f0f415b4e7c6f2acfd7153c960d648aa2489e Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Mon, 27 Mar 2017 15:04:41 +0200 Subject: [PATCH 1/2] Makes DATE_ISO available to docker-compose build args, for when... GIT_COMMIT is unavailable or insufficient --- build-contract | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-contract b/build-contract index 1fe04c1..ef54cf9 100755 --- a/build-contract +++ b/build-contract @@ -16,6 +16,8 @@ fi [[ -z "$PROJECT_NAME" ]] && PROJECT_NAME=${ROOT##*/} +export DATE_ISO=$(date -u +"%Y-%m-%dT%H:%M:%SZ") + GIT_COMMIT=$(git rev-parse --verify --short HEAD 2>/dev/null) if [[ ! -z "$GIT_COMMIT" ]]; then GIT_STATUS=$(git status -s) From 9877d32e3f6d417f855c6d036ef72a94eb054ba9 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Mon, 27 Mar 2017 15:14:39 +0200 Subject: [PATCH 2/2] GIT_COMMIT is a jenkins convention and BUILD_TIMESTAMP could be --- build-contract | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-contract b/build-contract index ef54cf9..08f29ea 100755 --- a/build-contract +++ b/build-contract @@ -16,7 +16,7 @@ fi [[ -z "$PROJECT_NAME" ]] && PROJECT_NAME=${ROOT##*/} -export DATE_ISO=$(date -u +"%Y-%m-%dT%H:%M:%SZ") +export BUILD_TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ") GIT_COMMIT=$(git rev-parse --verify --short HEAD 2>/dev/null) if [[ ! -z "$GIT_COMMIT" ]]; then