You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by kl...@apache.org on 2022/08/03 07:03:16 UTC

[incubator-devlake] branch main updated: fix: pack swagger doc into docker images (#2657)

This is an automated email from the ASF dual-hosted git repository.

klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 17a9eb94 fix: pack swagger doc into docker images (#2657)
17a9eb94 is described below

commit 17a9eb94e69cd0d8e0fcb6fca3de61d0d0407922
Author: Klesh Wong <zh...@merico.dev>
AuthorDate: Wed Aug 3 15:03:12 2022 +0800

    fix: pack swagger doc into docker images (#2657)
---
 Makefile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index b685adff..c996822d 100644
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,11 @@ SHA = $(shell git show -s --format=%h)
 TAG = $(shell git tag --points-at HEAD)
 VERSION = $(TAG)@$(SHA)
 
+swag:
+	echo "you need to install swag by `go install github.com/swaggo/swag/cmd/swag@latest` first"
+	swag init --parseDependency --parseInternal -o ./api/docs -g ./api/api.go -g plugins/*/api/*.go
+	echo "visit the swagger document on http://localhost:8080/swagger/index.html"
+
 build-plugin:
 	@sh scripts/compile-plugins.sh
 
@@ -30,7 +35,7 @@ build-plugin-debug:
 build-worker:
 	go build -ldflags "-X 'github.com/apache/incubator-devlake/version.Version=$(VERSION)'" -o bin/lake-worker ./worker/
 
-build-server:
+build-server: swag
 	go build -ldflags "-X 'github.com/apache/incubator-devlake/version.Version=$(VERSION)'" -o bin/lake
 
 build: build-plugin build-server
@@ -43,11 +48,6 @@ run:
 worker:
 	go run worker/*.go
 
-swag:
-	echo "you need to install swag by `go install github.com/swaggo/swag/cmd/swag@latest` first"
-	swag init --parseDependency --parseInternal -o ./api/docs -g ./api/api.go -g plugins/*/api/*.go
-	echo "visit the swagger document on http://localhost:8080/swagger/index.html"
-
 dev: build-plugin run
 
 debug: build-plugin-debug