Skip to content

Commit

Permalink
build: use prettier for command documentation normalization
Browse files Browse the repository at this point in the history
  • Loading branch information
ccamel committed Jan 2, 2024
1 parent 0de0a80 commit f5bc10f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ DOCKER_IMAGE_GOLANG_CI = golangci/golangci-lint:v1.54
DOCKER_IMAGE_BUF = okp4/buf-cosmos:1.4.7
DOCKER_BUILDX_BUILDER = okp4-builder
DOCKER_IMAGE_MARKDOWNLINT = thegeeklab/markdownlint-cli:0.32.2
DOCKER_IMAGE_PRETTIER = tmknom/prettier:3.1.1
DOCKER_IMAGE_GOTEMPLATE = hairyhenderson/gomplate:v3.11.3-alpine

# Some colors
Expand Down Expand Up @@ -390,12 +391,11 @@ doc-command: ## Generate markdown documentation for the command
sed -i $(SED_FLAG) 's/(default \"\/.*\/\.okp4d\")/(default \"\/home\/john\/\.okp4d\")/g' $$OUT_FOLDER/*.md; \
sed -i $(SED_FLAG) 's/node\ name\ (default\ \".*\")/node\ name\ (default\ \"my-machine\")/g' $$OUT_FOLDER/*.md; \
sed -i $(SED_FLAG) 's/IP\ (default\ \".*\")/IP\ (default\ \"127.0.0.1\")/g' $$OUT_FOLDER/*.md; \
sed -i $(SED_FLAG) 's/<appd>/okp4d/g' $$OUT_FOLDER/*.md; \
sed -i $(SED_FLAG) 's/<\([a-zA-Z-]*\)>/\&lt;\1\&gt;/g' $$OUT_FOLDER/*.md; \
sed -i $(SED_FLAG) 's/&lt;appd&gt;/okp4d/g' $$OUT_FOLDER/*.md; \
docker run --rm \
-v `pwd`:/usr/src/docs \
-w /usr/src/docs \
${DOCKER_IMAGE_MARKDOWNLINT} -f $$OUT_FOLDER -c docs/.markdownlint.yaml
${DOCKER_IMAGE_PRETTIER} --write --parser=markdown $$OUT_FOLDER/*.md

.PHONY: doc-predicate
doc-predicate: ## Generate markdown documentation for all the predicates (module logic)
Expand Down

0 comments on commit f5bc10f

Please sign in to comment.