From 92acdbc3ec6a3b1d6e4d49a1c945cf204cb50f16 Mon Sep 17 00:00:00 2001 From: Adam Samalik Date: Dec 04 2018 13:41:16 +0000 Subject: date + time of build as env for the UI --- diff --git a/build.sh b/build.sh index 1e4db2d..a527e3d 100755 --- a/build.sh +++ b/build.sh @@ -10,7 +10,7 @@ if [ "$(uname)" == "Darwin" ]; then echo "" echo "This build script is using Docker container runtime to run the build in an isolated environment." echo "" - docker run --rm -it -v $(pwd):/antora $image $cmd + docker run -e "ANTORA_DATE=$(date -u)" --rm -it -v $(pwd):/antora $image $cmd elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then # Running on Linux. @@ -21,7 +21,7 @@ elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then echo "" echo "This build script is using Podman to run the build in an isolated environment." echo "" - podman run --rm -it -v $(pwd):/antora:z $image $cmd + podman run -e "ANTORA_DATE=$(date -u)" --rm -it -v $(pwd):/antora:z $image $cmd elif [ -f /usr/bin/docker ]; then echo "" @@ -29,13 +29,13 @@ elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then echo "" if groups | grep -wq "docker"; then - docker run --rm -it -v $(pwd):/antora:z $image $cmd + docker run -e "ANTORA_DATE=$(date -u)" --rm -it -v $(pwd):/antora:z $image $cmd else echo "" echo "This build script is using $runtime to run the build in an isolated environment. You might be asked for your password." echo "You can avoid this by adding your user to the 'docker' group, but be aware of the security implications. See https://docs.docker.com/install/linux/linux-postinstall/." echo "" - sudo docker run --rm -it -v $(pwd):/antora:z $image $cmd + sudo docker run -e "ANTORA_DATE=$(date -u)" --rm -it -v $(pwd):/antora:z $image $cmd fi else echo ""