move go <-> api check in linters (#5425)

This commit is contained in:
Alessandro Ros
2026-02-06 16:12:57 +01:00
committed by GitHub
parent ae21240c76
commit 325d00dfb8
6 changed files with 29 additions and 12 deletions
+7 -7
View File
@@ -15,37 +15,37 @@ RUN go generate ./...
FROM build-base AS build-windows-amd64
ENV GOOS=windows GOARCH=amd64
RUN go build -tags enableUpgrade -o "tmp/$(BINARY_NAME).exe"
RUN go build -tags enable_upgrade -o "tmp/$(BINARY_NAME).exe"
RUN cd tmp && zip -q "../binaries/$(BINARY_NAME)_$$(cat ../internal/core/VERSION)_windows_amd64.zip" "$(BINARY_NAME).exe" mediamtx.yml LICENSE
FROM build-base AS build-linux-amd64
ENV GOOS=linux GOARCH=amd64
RUN go build -tags enableUpgrade -o "tmp/$(BINARY_NAME)"
RUN go build -tags enable_upgrade -o "tmp/$(BINARY_NAME)"
RUN tar -C tmp -czf "binaries/$(BINARY_NAME)_$$(cat internal/core/VERSION)_linux_amd64.tar.gz" --owner=0 --group=0 "$(BINARY_NAME)" mediamtx.yml LICENSE
FROM build-base AS build-darwin-amd64
ENV GOOS=darwin GOARCH=amd64
RUN go build -tags enableUpgrade -o "tmp/$(BINARY_NAME)"
RUN go build -tags enable_upgrade -o "tmp/$(BINARY_NAME)"
RUN tar -C tmp -czf "binaries/$(BINARY_NAME)_$$(cat internal/core/VERSION)_darwin_amd64.tar.gz" --owner=0 --group=0 "$(BINARY_NAME)" mediamtx.yml LICENSE
FROM build-base AS build-darwin-arm64
ENV GOOS=darwin GOARCH=arm64
RUN go build -tags enableUpgrade -o "tmp/$(BINARY_NAME)"
RUN go build -tags enable_upgrade -o "tmp/$(BINARY_NAME)"
RUN tar -C tmp -czf "binaries/$(BINARY_NAME)_$$(cat internal/core/VERSION)_darwin_arm64.tar.gz" --owner=0 --group=0 "$(BINARY_NAME)" mediamtx.yml LICENSE
FROM build-base AS build-linux-armv6
ENV GOOS=linux GOARCH=arm GOARM=6
RUN go build -tags enableUpgrade -o "tmp/$(BINARY_NAME)"
RUN go build -tags enable_upgrade -o "tmp/$(BINARY_NAME)"
RUN tar -C tmp -czf "binaries/$(BINARY_NAME)_$$(cat internal/core/VERSION)_linux_armv6.tar.gz" --owner=0 --group=0 "$(BINARY_NAME)" mediamtx.yml LICENSE
FROM build-base AS build-linux-armv7
ENV GOOS=linux GOARCH=arm GOARM=7
RUN go build -tags enableUpgrade -o "tmp/$(BINARY_NAME)"
RUN go build -tags enable_upgrade -o "tmp/$(BINARY_NAME)"
RUN tar -C tmp -czf "binaries/$(BINARY_NAME)_$$(cat internal/core/VERSION)_linux_armv7.tar.gz" --owner=0 --group=0 "$(BINARY_NAME)" mediamtx.yml LICENSE
FROM build-base AS build-linux-arm64
ENV GOOS=linux GOARCH=arm64
RUN go build -tags enableUpgrade -o "tmp/$(BINARY_NAME)"
RUN go build -tags enable_upgrade -o "tmp/$(BINARY_NAME)"
RUN tar -C tmp -czf "binaries/$(BINARY_NAME)_$$(cat internal/core/VERSION)_linux_arm64.tar.gz" --owner=0 --group=0 "$(BINARY_NAME)" mediamtx.yml LICENSE
FROM $(BASE_IMAGE)
+4 -1
View File
@@ -19,6 +19,9 @@ lint-go-mod:
go mod tidy
git diff --exit-code
lint-go2api:
go test -v -tags enable_linters ./internal/linters/go2api
lint-docs:
echo "$$DOCKERFILE_DOCS_LINT" | docker build . -f - -t temp
docker run --rm -v "$(shell pwd)/docs:/s" -w /s temp \
@@ -30,4 +33,4 @@ lint-api-docs:
docker run --rm -v "$(shell pwd)/api:/s" -w /s temp \
sh -c "openapi lint openapi.yaml"
lint: lint-go lint-go-mod lint-docs lint-api-docs
lint: lint-go lint-go-mod lint-go2api lint-docs lint-api-docs