summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2021-02-24 23:36:48 +0100
committerGitHub <noreply@github.com>2021-02-24 16:36:48 -0600
commit5cc1a49b19fd6f28f38d07df864988c3b0e348cd (patch)
tree463b262ab4abed71f7f73a57b97b78d874e3f5bd /Makefile
parent61f347e3499ef55c57b87e09e92fa44ec127b451 (diff)
downloadgitea-5cc1a49b19fd6f28f38d07df864988c3b0e348cd.tar.gz
gitea-5cc1a49b19fd6f28f38d07df864988c3b0e348cd.zip
Generate man pages (#13901)
* extend gitignore * first working draft * use docs subcomand * rm config-sheet-sheet-2-man
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 9a4f8297b0..d19e8d6716 100644
--- a/Makefile
+++ b/Makefile
@@ -178,6 +178,7 @@ help:
@echo " - fmt format the Go code"
@echo " - generate-license update license files"
@echo " - generate-gitignore update gitignore files"
+ @echo " - generate-manpage generate manpage"
@echo " - generate-swagger generate the swagger spec from code comments"
@echo " - swagger-validate check if the swagger spec is valid"
@echo " - golangci-lint run golangci-lint linter"
@@ -223,7 +224,7 @@ clean:
integrations*.test \
integrations/gitea-integration-pgsql/ integrations/gitea-integration-mysql/ integrations/gitea-integration-mysql8/ integrations/gitea-integration-sqlite/ \
integrations/gitea-integration-mssql/ integrations/indexers-mysql/ integrations/indexers-mysql8/ integrations/indexers-pgsql integrations/indexers-sqlite \
- integrations/indexers-mssql integrations/mysql.ini integrations/mysql8.ini integrations/pgsql.ini integrations/mssql.ini
+ integrations/indexers-mssql integrations/mysql.ini integrations/mysql8.ini integrations/pgsql.ini integrations/mssql.ini man/
.PHONY: fmt
fmt:
@@ -702,6 +703,14 @@ generate-images:
npm install --no-save --no-package-lock fabric imagemin-zopfli
node build/generate-images.js $(TAGS)
+.PHONY: generate-manpage
+generate-manpage:
+ @[ -f gitea ] || make backend
+ @mkdir -p man/man1/ man/man5
+ @./gitea docs --man > man/man1/gitea.1
+ @gzip -9 man/man1/gitea.1 && echo man/man1/gitea.1.gz created
+ @#TODO A smal script witch format config-cheat-sheet.en-us.md nicely to suit as config man page
+
.PHONY: pr\#%
pr\#%: clean-all
$(GO) run contrib/pr/checkout.go $*