From 71008c5541ae46fa46c8717a817a321ec988321d Mon Sep 17 00:00:00 2001 From: Mark Chmarny Date: Thu, 18 Jun 2020 14:53:56 -0700 Subject: [PATCH] initial docs --- .gitignore | 3 +++ Makefile | 13 ++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7102005..a347e7b 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,6 @@ # vendor vendor + +# docs +golang.org diff --git a/Makefile b/Makefile index 2e1ce74..2c30eb4 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ RELEASE_VERSION =v0.8.0 +GDOC_PORT =8888 -.PHONY: mod test service client lint protps tag lint clean, help +.PHONY: mod test service client lint protps tag lint docs clean help all: test protos: ## Downloads proto files from dapr/dapr, generates gRPC clients @@ -27,6 +28,16 @@ client: mod ## Runs the uncompiled example client code lint: ## Lints the entire project golangci-lint run --timeout=3m +docs: ## Runs godoc (in container due to mod support) + docker run \ + --rm \ + -e "GOPATH=/tmp/go" \ + -p 127.0.0.1:$(GDOC_PORT):$(GDOC_PORT) \ + -v $(PWD):/tmp/go/src/ \ + --name godoc golang \ + bash -c "go get golang.org/x/tools/cmd/godoc && echo http://localhost:$(GDOC_PORT)/pkg/ && /tmp/go/bin/godoc -http=:$(GDOC_PORT)" + open http://localhost:8888/pkg/client/ + tag: ## Creates release tag git tag $(RELEASE_VERSION) git push origin $(RELEASE_VERSION)