Run lint as part of the docker build.

This commit is contained in:
Michael Kaye 2022-01-18 18:03:21 +00:00
parent 8e842a3fc2
commit c84c574928
3 changed files with 6 additions and 2 deletions

View file

@ -8,4 +8,4 @@ go get golang.org/x/lint/golint
go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
go get github.com/fzipp/gocyclo/cmd/gocyclo go get github.com/fzipp/gocyclo/cmd/gocyclo
./scripts/lint.sh /bin/sh ./scripts/lint.sh

View file

@ -7,7 +7,11 @@ COPY go.mod .
COPY go.sum . COPY go.sum .
RUN go mod download RUN go mod download
COPY . . COPY . .
RUN CGO_ENABLED=0 sh .buildkite/lint.sh
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o rageshake RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o rageshake
FROM scratch FROM scratch

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/sh
# #
# check the go source for lint. This is run by CI, and the pre-commit hook. # check the go source for lint. This is run by CI, and the pre-commit hook.