Skip to content

Commit

Permalink
Merge pull request #256 from openinfradev/swag_build_error
Browse files Browse the repository at this point in the history
fix. build error
  • Loading branch information
ktkfree authored Mar 4, 2024
2 parents 1886eec + 06a55c2 commit 2490b5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN wget https://github.com/swaggo/swag/releases/download/v1.16.3/swag_1.16.3_Li
WORKDIR /app/backend
COPY ./ .

RUN swag init -g ./cmd/server/main.go -o ./api/swagger
RUN swag init -g ./cmd/server/main.go --parseDependency --parseInternal -o ./api/swagger

RUN go mod tidy
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./bin/server ./cmd/server/main.go
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: docs
docs:
swag init -g ./cmd/server/main.go -o ./api/swagger
swag init -g ./cmd/server/main.go --parseDependency --parseInternal -o ./api/swagger

.PHONY: build
build:
Expand All @@ -17,6 +17,6 @@ test:

.PHONY: dev_run
dev_run:
swag init -g ./cmd/server/main.go -o ./api/swagger
swag init -g ./cmd/server/main.go --parseDependency --parseInternal -o ./api/swagger
go build ./cmd/server/main.go
./main

0 comments on commit 2490b5f

Please sign in to comment.