From 86d1196f9b30149fa937f7c6680d951c5e4ac997 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Mon, 12 Nov 2018 16:51:47 -0500 Subject: Standardized container image for gofmt and lint Having a standardized image allows uniform application of format and lint checking across multiple host platforms. This ensures all contributors and disparate CI systems to play by a common set of basic rules. It also makes it easier to maintain the common rules over-time. Signed-off-by: Chris Evich --- contrib/gate/entrypoint.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 contrib/gate/entrypoint.sh (limited to 'contrib/gate/entrypoint.sh') diff --git a/contrib/gate/entrypoint.sh b/contrib/gate/entrypoint.sh new file mode 100755 index 000000000..e16094cc0 --- /dev/null +++ b/contrib/gate/entrypoint.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +[[ -n "$SRCPATH" ]] || \ + ( echo "ERROR: \$SRCPATH must be non-empty" && exit 1 ) +[[ -n "$GOSRC" ]] || \ + ( echo "ERROR: \$GOSRC must be non-empty" && exit 2 ) +[[ -r "${SRCPATH}/contrib/gate/Dockerfile" ]] || \ + ( echo "ERROR: Expecting libpod repository root at $SRCPATH" && exit 3 ) + +# Working from a copy avoids needing to perturb the actual source files +mkdir -p "$GOSRC" +/usr/bin/rsync --recursive --links --quiet --safe-links \ + --perms --times "${SRCPATH}/" "${GOSRC}/" +cd "$GOSRC" +make "$@" -- cgit v1.2.3-54-g00ecf