mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
improve script compatibility (#4132)
This commit is contained in:
parent
0af7bcc6de
commit
c6a54d1229
5 changed files with 7 additions and 7 deletions
|
|
@ -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"
|
||||||
|
|
|
||||||
|
|
@ -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 ."
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue