Skip to content

Commit

Permalink
improve script compatibility (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 authored Jan 10, 2025
1 parent 5355248 commit 5943414
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions scripts/binaries.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ COPY go.mod go.sum ./
RUN go mod download
COPY . ./
ARG VERSION
ENV CGO_ENABLED 0
ENV CGO_ENABLED=0
RUN rm -rf tmp binaries
RUN mkdir tmp binaries

Expand Down Expand Up @@ -45,5 +45,5 @@ binaries:
echo "$$DOCKERFILE_BINARIES" | DOCKER_BUILDKIT=1 docker build . -f - \
--build-arg VERSION=$$(git describe --tags) \
-t temp
docker run --rm -v $(PWD):/out \
docker run --rm -v $(shell pwd):/out \
temp sh -c "rm -rf /out/binaries && cp -r /s/binaries /out/"
2 changes: 1 addition & 1 deletion scripts/format.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export DOCKERFILE_FORMAT

format:
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 ."
2 changes: 1 addition & 1 deletion scripts/lint.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
lint:
docker run --rm -v $(PWD):/app -w /app \
docker run --rm -v $(shell pwd):/app -w /app \
$(LINT_IMAGE) \
golangci-lint run -v
2 changes: 1 addition & 1 deletion scripts/mod-tidy.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
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"
2 changes: 1 addition & 1 deletion scripts/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ export DOCKERFILE_TEST
test:
echo "$$DOCKERFILE_TEST" | docker build -q . -f - -t temp
docker run --rm \
-v $(PWD):/s -w /s \
-v $(shell pwd):/s -w /s \
temp \
go test -v -race -coverprofile=coverage.txt .

0 comments on commit 5943414

Please sign in to comment.