Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add swag install guide message to MAKEFILE #1869

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

seokho-son
Copy link
Member

fix #1868

@seokho-son
Copy link
Member Author

@sykim-etri 리뷰를 부탁드립니다. :)

@sykim-etri
Copy link
Member

GPT 도움을 살짝 받아 아래와 같이 하는 방법도 있겠습니다.

swag swagger:
	@if [ ! -f ~/go/bin/swag ]; then \
		echo ""; \
		echo "This command requires swag binary."; \
		echo "If you don't have it, please install swag first with the following command"; \
		echo "- go install github.com/swaggo/swag/cmd/swag@latest"; \
		exit 1; \
	fi

	@echo "Generating Swagger docs..."
	~/go/bin/swag i -o ./api/rest/docs
	scripts/misc/convert-swagger-version.sh	

@seokho-son
Copy link
Member Author

seokho-son commented Oct 21, 2024

GPT 도움을 살짝 받아 아래와 같이 하는 방법도 있겠습니다.

swag swagger:
	@if [ ! -f ~/go/bin/swag ]; then \
		echo ""; \
		echo "This command requires swag binary."; \
		echo "If you don't have it, please install swag first with the following command"; \
		echo "- go install github.com/swaggo/swag/cmd/swag@latest"; \
		exit 1; \
	fi

	@echo "Generating Swagger docs..."
	~/go/bin/swag i -o ./api/rest/docs
	scripts/misc/convert-swagger-version.sh	

if 구문, ; 인코딩 등이 환경에 따라서 잘 동작하지 않는 경우들이 있곤 해서, 간결하게 처리하였습니다. ^^

@sykim-etri
Copy link
Member

@seokho-son 아. 그렇군요. /bin/sh는 문제가 없을 것이라 생각했는데, 그렇지 않은 모양이네요~
암튼 적절히 처리하시면 되겠습니다.

@seokho-son
Copy link
Member Author

그럼 일단 승인 후~ 향후 개선을 노려보겠습니다. :)

@seokho-son
Copy link
Member Author

/approve

@github-actions github-actions bot added the approved This PR is approved and will be merged soon. label Oct 21, 2024
@cb-github-robot cb-github-robot merged commit df38691 into cloud-barista:main Oct 21, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved This PR is approved and will be merged soon. src
Projects
None yet
Development

Successfully merging this pull request may close these issues.

swag binary should be installed before running make swag
3 participants