improve script compatibility (#4132)

This commit is contained in:
Alessandro Ros 2025-01-10 17:36:03 +01:00 committed by GitHub
parent 0af7bcc6de
commit c6a54d1229
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 7 additions and 7 deletions

View file

@ -6,5 +6,5 @@ export DOCKERFILE_APIDOCS_GEN
apidocs: apidocs:
echo "$$DOCKERFILE_APIDOCS_GEN" | docker build . -f - -t temp echo "$$DOCKERFILE_APIDOCS_GEN" | docker build . -f - -t temp
docker run --rm -v "$(PWD)/apidocs:/s" -w /s temp \ docker run --rm -v "$(shell pwd)/apidocs:/s" -w /s temp \
sh -c "redoc-cli bundle openapi.yaml" sh -c "redoc-cli bundle openapi.yaml"

View file

@ -6,5 +6,5 @@ export DOCKERFILE_FORMAT
format: format:
echo "$$DOCKERFILE_FORMAT" | docker build -q . -f - -t temp echo "$$DOCKERFILE_FORMAT" | docker build -q . -f - -t temp
docker run --rm -it -v "$(PWD):/s" -w /s temp \ docker run --rm -it -v "$(shell pwd):/s" -w /s temp \
sh -c "gofumpt -l -w ." sh -c "gofumpt -l -w ."

View file

@ -5,7 +5,7 @@ endef
export DOCKERFILE_APIDOCS_LINT export DOCKERFILE_APIDOCS_LINT
lint-golangci: lint-golangci:
docker run --rm -v "$(PWD):/app" -w /app \ docker run --rm -v "$(shell pwd):/app" -w /app \
$(LINT_IMAGE) \ $(LINT_IMAGE) \
golangci-lint run -v golangci-lint run -v
@ -15,7 +15,7 @@ lint-mod-tidy:
lint-apidocs: lint-apidocs:
echo "$$DOCKERFILE_APIDOCS_LINT" | docker build . -f - -t temp echo "$$DOCKERFILE_APIDOCS_LINT" | docker build . -f - -t temp
docker run --rm -v "$(PWD)/apidocs:/s" -w /s temp \ docker run --rm -v "$(shell pwd)/apidocs:/s" -w /s temp \
sh -c "openapi lint openapi.yaml" sh -c "openapi lint openapi.yaml"
lint: lint-golangci lint-mod-tidy lint-apidocs lint: lint-golangci lint-mod-tidy lint-apidocs

View file

@ -1,3 +1,3 @@
mod-tidy: mod-tidy:
docker run --rm -it -v "$(PWD):/s" -w /s $(BASE_IMAGE) \ docker run --rm -it -v "$(shell pwd):/s" -w /s $(BASE_IMAGE) \
sh -c "apk add git && GOPROXY=direct go mod tidy" sh -c "apk add git && GOPROXY=direct go mod tidy"

View file

@ -25,13 +25,13 @@ export DOCKERFILE_TEST
test: test:
echo "$$DOCKERFILE_TEST" | docker build -q . -f - -t temp --build-arg ARCH=amd64 echo "$$DOCKERFILE_TEST" | docker build -q . -f - -t temp --build-arg ARCH=amd64
docker run --rm \ docker run --rm \
-v "$(PWD):/s" \ -v "$(shell pwd):/s" \
temp \ temp \
make test-nodocker make test-nodocker
test32: test32:
echo "$$DOCKERFILE_TEST" | docker build -q . -f - -t temp --build-arg ARCH=i386 echo "$$DOCKERFILE_TEST" | docker build -q . -f - -t temp --build-arg ARCH=i386
docker run --rm \ docker run --rm \
-v "$(PWD):/s" \ -v "$(shell pwd):/s" \
temp \ temp \
make test-nodocker make test-nodocker