Skip to content

Commit

Permalink
fix: build go 1.19
Browse files Browse the repository at this point in the history
  • Loading branch information
mhf-ir committed Jan 18, 2023
1 parent 0c0b299 commit 9368f98
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ ADD . /src
COPY --from=static /src/static /src/static

RUN cd /src \
&& go get -u -v golang.org/x/lint/golint \
&& go mod tidy \
&& golint . \
&& export CI=1 \
&& go test -covermode=count -coverprofile=coverage.out \
&& go test -short -covermode=count -coverprofile=coverage.out \
&& cat coverage.out | grep -v "main.go" > coverage.txt \
&& TOTAL_COVERAGE_FOR_CI_F=$(go tool cover -func coverage.txt | grep total | grep -Eo '[0-9]+.[0-9]+') \
&& echo "TOTAL_COVERAGE_FOR_CI_F: $TOTAL_COVERAGE_FOR_CI_F" \
&& CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o nginx-protection
&& CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o nginx-protection \
&& ls -lah /src/nginx-protection

FROM alpine

Expand Down

0 comments on commit 9368f98

Please sign in to comment.