Skip to content

Commit

Permalink
chore: remove go:generate and add code gen to dockerfile (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
MR2011 authored Oct 31, 2024
1 parent d126a34 commit 16281cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.23.2 AS builder

WORKDIR /go/src/github.com/cloudoperators/heureka
ADD . .
RUN go generate ./...

# generate mock code files
RUN go install github.com/vektra/mockery/[email protected]
RUN mockery
# generate graphql code
RUN cd internal/api/graphql && go run github.com/99designs/gqlgen generate

RUN CGO_ENABLED=0 go build -o /go/bin/heureka cmd/heureka/main.go

FROM --platform=${BUILDPLATFORM:-linux/amd64} gcr.io/distroless/static-debian12:nonroot
Expand Down
2 changes: 0 additions & 2 deletions internal/api/graphql/graph/resolver/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

package resolver

//go:generate go run github.com/99designs/gqlgen generate

import (
"github.com/cloudoperators/heureka/internal/api/graphql/graph"
"github.com/cloudoperators/heureka/internal/app"
Expand Down
3 changes: 0 additions & 3 deletions internal/database/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

package database

//go:generate go install github.com/vektra/mockery/[email protected]
//go:generate mockery

import "github.com/cloudoperators/heureka/internal/entity"

type Database interface {
Expand Down

0 comments on commit 16281cf

Please sign in to comment.