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

change(docs): location and folder structure #26

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ PROTOC_GEN_VALIDATE_PROTO=${SUBMODULES_DIR}/protoc-gen-validate
GOOGLE_OPENAPI_PROTO=${SUBMODULES_DIR}/gnostic/openapiv3
PROTO_OPTION=-I. -I${SUBMODULES_DIR} -I${GOOGLEAPIS_PROTO} -I${GOOGLEPROTOBUF_PROTO} -I${PROTOC_GEN_VALIDATE_PROTO} -I${GOOGLE_OPENAPI_PROTO}
PROTO_DOCS_OPTS=${PROTO_OPTION} \
--plugin=protoc-gen-doc=${BIN_DIR}/protoc-gen-doc \
--doc_out=./docs
--plugin=protoc-gen-doc=${BIN_DIR}/protoc-gen-doc

# GO
PROTOC_GO_OPTS=${PROTO_OPTION} \
Expand Down Expand Up @@ -112,23 +111,23 @@ clean/go:
@rm -rf ${GEN_GO_DIR}

.PHONY: release/go
release/go: proto docs
release/go: proto
@echo "Publishing go client..."
@rm -rf ${TMP_REPO_DIR} && mkdir -p ${TMP_REPO_DIR}
@git clone ${REPO}-go.git ${TMP_REPO_DIR}/client-go
@cd ${TMP_REPO_DIR}/client-go && git clean -fdx #&& git checkout main
@cp $(PWD)/scripts/go/go.mod ${TMP_REPO_DIR}/client-go/go.mod
@cp $(PWD)/docs/README.md ${TMP_REPO_DIR}/client-go/README.md
#@cp $(PWD)/docs/README.md ${TMP_REPO_DIR}/client-go/README.md
@cp $(PWD)/CHANGELOG.md ${TMP_REPO_DIR}/client-go/CHANGELOG.md
@cp -R $(PWD)/gen/go/src ${TMP_REPO_DIR}/client-go
@cp -R $(PWD)/gen/go ${TMP_REPO_DIR}/client-go
@rm -rf ${TMP_REPO_DIR}/client-go/**openapi**.*
@$(eval NEXT_VERSION=$(shell test $(NEXT_VERSION) && echo $(NEXT_VERSION) || echo $(LAST_TAG)))
@cd ${TMP_REPO_DIR}/client-go && git add . && git commit -m "bump(version): $(NEXT_VERSION)" && git tag -a $(NEXT_VERSION) -m '$(NEXT_VERSION)' && git push --tags origin main

.PHONY: docs
docs:
@echo "Generating docs..."
@rm -rf docs && mkdir -p docs
@find proto -name '*.proto' -print0 | xargs -0 -I{} -P${CPUS} protoc ${PROTO_DOCS_OPTS} --doc_opt=markdown,README.md {}
find proto -name '*.proto' -printf '%h\0' | sort -zu | xargs -0 -I{} -P${CPUS} bash -c "d={}; protoc ${PROTO_DOCS_OPTS} --doc_opt=./scripts/markdown.tmpl,README.md:google/* --doc_out=hoguera/platform/"'$$d'" hoguera/platform/"'$$d'"/*.proto"


LINT_PLUGIN=${BIN_DIR}/protoc-gen-lint
Expand All @@ -143,7 +142,7 @@ fmt:
@find proto -type f -name "*.proto" | xargs -I{} -P${CPUS} clang-format -i {}

.PHONY: changelog
changelog:
changelog: docs
@echo "Generating changelog..."
@$(eval NEXT_VERSION=$(shell test $(NEXT_VERSION) && echo $(NEXT_VERSION) || echo $(LAST_TAG) | awk -F. '{print $$1"."$$2+1".0"}'))
@test $NEXT_VERSION || (echo "NEXT_VERSION is not set"; exit 1)
Expand Down
244 changes: 0 additions & 244 deletions docs/README.md

This file was deleted.

Loading
Loading