From 3ff54329778825afa0a7876397e0e64ef18aca96 Mon Sep 17 00:00:00 2001 From: Gearl Brace Date: Fri, 22 Dec 2023 19:40:07 +0000 Subject: [PATCH] add better image tagging for container --- contrib/container-build/buildit.sh | 5 ++++- contrib/container-build/scripts/fdbuild.sh | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/contrib/container-build/buildit.sh b/contrib/container-build/buildit.sh index 5b5e209f20..7f92f212b3 100755 --- a/contrib/container-build/buildit.sh +++ b/contrib/container-build/buildit.sh @@ -4,6 +4,9 @@ OUTDIR=~/build SCRIPTDIR=${PWD}/scripts MACHINE=linux_gcc_x86_64 +#Bump this any time there's a change to the Dockerfile +IMAGETAG=0.5 + GETOPT=$(getopt -o :t:m:h -l tag:,machine:,help -n $0 -- "$@") eval set -- "$GETOPT" @@ -46,7 +49,7 @@ fi -$DOCKER image exists fdbuilder:latest || $DOCKER build -t fdbuilder:latest . +$DOCKER image exists fdbuilder:$IMAGETAG || $DOCKER build -t fdbuilder:$IMAGETAG -t fdbuilder:latest . $DOCKER run --rm \ --volume "$OUTDIR:/build/out:Z" \ diff --git a/contrib/container-build/scripts/fdbuild.sh b/contrib/container-build/scripts/fdbuild.sh index 2b19d01a98..9e50deac73 100755 --- a/contrib/container-build/scripts/fdbuild.sh +++ b/contrib/container-build/scripts/fdbuild.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -xeo pipefail +set -eo pipefail GITDIR=/build/src source "$HOME/.cargo/env"