Use official shfmt docker image
parent
e5541c42a5
commit
5f6fbb81fc
|
@ -1,3 +0,0 @@
|
||||||
FROM golang
|
|
||||||
|
|
||||||
RUN go get github.com/mvdan/sh/cmd/shfmt
|
|
|
@ -10,12 +10,7 @@ fi
|
||||||
|
|
||||||
SRC_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && cd .. pwd)"
|
SRC_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && cd .. pwd)"
|
||||||
|
|
||||||
if ! docker build -t docker-php-extension-installer-shfmt:latest -f scripts/Dockerfile-shfmt -q .; 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
|
|
||||||
|
|
||||||
if ! docker run --rm -v "$SRC_DIR:/src" -w /src docker-php-extension-installer-shfmt:latest ./scripts/invoke-shfmt fix; then
|
|
||||||
printf 'ERROR!' >&2
|
printf 'ERROR!' >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -8,10 +8,7 @@ cd /d "%~dp0.."
|
||||||
if errorlevel 1 goto err
|
if errorlevel 1 goto err
|
||||||
set SRC_DIR=%CD%
|
set SRC_DIR=%CD%
|
||||||
|
|
||||||
docker build -t docker-php-extension-installer-shfmt:latest -f scripts\Dockerfile-shfmt -q .
|
docker run --rm -v "%SRC_DIR%:/src" -w /src --entrypoint /src/scripts/invoke-shfmt mvdan/shfmt:latest fix
|
||||||
if errorlevel 1 goto :err
|
|
||||||
|
|
||||||
docker run --rm -v "%SRC_DIR%:/src" -w /src docker-php-extension-installer-shfmt:latest ./scripts/invoke-shfmt fix
|
|
||||||
if errorlevel 1 goto :err
|
if errorlevel 1 goto :err
|
||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue