generate code inside Docker container

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2020-06-15 15:52:47 +02:00
parent c5895fe09a
commit 874be0873d
No known key found for this signature in database
GPG Key ID: 9858809D6F8F6E7E
2 changed files with 6 additions and 1 deletions

View File

@ -18,6 +18,8 @@ COPY . .
FROM base AS make-plugin
ARG TARGETOS
ARG TARGETARCH
RUN apk add build-base
RUN GO111MODULE=on go get github.com/golang/mock/mockgen@latest
RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg/mod \
GOOS=${TARGETOS} \

View File

@ -20,7 +20,10 @@ all: build
clean:
rm -rf dist/
build:
generate: pkg/amazon/sdk/api_mock.go
go generate ./...
build: generate
$(GO_BUILD) -v -o $(BINARY_WITH_EXTENSION) cmd/main/main.go
cross: