From 5f6fbb81fc1224b96bb72d0554e133fc69c103a7 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Fri, 20 Dec 2019 19:10:33 +0100 Subject: [PATCH] Use official shfmt docker image --- scripts/Dockerfile-shfmt | 3 --- scripts/lint | 7 +------ scripts/lint.bat | 5 +---- 3 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 scripts/Dockerfile-shfmt diff --git a/scripts/Dockerfile-shfmt b/scripts/Dockerfile-shfmt deleted file mode 100644 index 5decefa..0000000 --- a/scripts/Dockerfile-shfmt +++ /dev/null @@ -1,3 +0,0 @@ -FROM golang - -RUN go get github.com/mvdan/sh/cmd/shfmt diff --git a/scripts/lint b/scripts/lint index 7e6f7c8..01edbeb 100755 --- a/scripts/lint +++ b/scripts/lint @@ -10,12 +10,7 @@ fi SRC_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && cd .. pwd)" -if ! docker build -t docker-php-extension-installer-shfmt:latest -f scripts/Dockerfile-shfmt -q .; then - printf 'ERROR!' >&2 - exit 1 -fi - -if ! docker run --rm -v "$SRC_DIR:/src" -w /src docker-php-extension-installer-shfmt:latest ./scripts/invoke-shfmt fix; then +if ! docker run --rm -v "$SRC_DIR:/src" -w /src --entrypoint /src/scripts/invoke-shfmt mvdan/shfmt:latest fix; then printf 'ERROR!' >&2 exit 1 fi diff --git a/scripts/lint.bat b/scripts/lint.bat index d5fba17..80a6386 100644 --- a/scripts/lint.bat +++ b/scripts/lint.bat @@ -8,10 +8,7 @@ cd /d "%~dp0.." if errorlevel 1 goto err set SRC_DIR=%CD% -docker build -t docker-php-extension-installer-shfmt:latest -f scripts\Dockerfile-shfmt -q . -if errorlevel 1 goto :err - -docker run --rm -v "%SRC_DIR%:/src" -w /src docker-php-extension-installer-shfmt:latest ./scripts/invoke-shfmt fix +docker run --rm -v "%SRC_DIR%:/src" -w /src --entrypoint /src/scripts/invoke-shfmt mvdan/shfmt:latest fix if errorlevel 1 goto :err goto :eof