Skip to content

feat(tools): Introduce tool to generate man pages #2023

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

Merged
merged 2 commits into from
Jan 28, 2025
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
13 changes: 13 additions & 0 deletions .goreleaser-stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ version: 2
#@ "linux": ["amd64"],
#@ },
#@ }

before:
hooks:
- make man

changelog:
sort: asc
use: github
Expand Down Expand Up @@ -90,6 +95,8 @@ nfpms:
contents:
- src: scripts/kraftld
dst: /usr/local/bin/kraftld
- src: ./docs/man/
dst: /usr/local/share/man/man1/

aurs:
- homepage: https://kraftkit.sh
Expand All @@ -108,6 +115,8 @@ aurs:
install -Dm755 "${srcdir}/kraft" "${pkgdir}/usr/bin/kraft"
# kraftld
install -Dm755 "${srcdir}/kraftld" "${pkgdir}/usr/bin/kraftld"
# man pages
install -Dm644 "./docs/man/*" "${pkgdir}/usr/local/share/man/man1"
commit_author:
name: Unikraft Bot
email: monkey+aur@unikraft.io
Expand All @@ -129,6 +138,8 @@ nix:
mkdir -p $out/bin
cp -vr ./dist/kraft $out/bin/kraft
cp -vr ./dist/kraftld $out/bin/kraftld
extra_install: |-
installManPage ./docs/man/*

brews:
- name: kraftkit
Expand Down Expand Up @@ -165,6 +176,8 @@ brews:
repository:
owner: unikraft
name: homebrew-cli
extra_install: |-
man1.install ./docs/man/*

builds:
#@ for bin, oses in binaries.items():
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,12 @@ properclean: ## Completely clean the repository's build artifacts.
.PHONY: docs
docs: OUTDIR ?= $(WORKDIR)/docs/
docs: ## Generate Markdown documentation.
$(GO) run $(WORKDIR)/tools/gendocs $(OUTDIR)
$(GO) run -tags "containers_image_storage_stub,containers_image_openpgp" $(WORKDIR)/tools/gendocs $(OUTDIR)

.PHONY: man
man: OUTDIR ?= $(WORKDIR)/docs/man/
man: ## Generate manpage documentation.
$(GO) run -tags "containers_image_storage_stub,containers_image_openpgp" $(WORKDIR)/tools/genman generate $(OUTDIR)

.PHONY: help
help: ## Show this help menu and exit.
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ require (
github.com/containerd/nerdctl v1.7.7
github.com/containerd/platforms v0.2.1
github.com/containers/image/v5 v5.32.2
github.com/cpuguy83/go-md2man/v2 v2.0.6
github.com/cyphar/filepath-securejoin v0.3.6
github.com/dgraph-io/badger/v3 v3.2103.5
github.com/docker/cli v27.5.0+incompatible
Expand Down Expand Up @@ -233,6 +234,7 @@ require (
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rootless-containers/rootlesskit v1.1.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/scylladb/go-set v1.0.3-0.20200225121959-cc7b2070d91e // indirect
github.com/secure-systems-lab/go-securesystemslib v0.8.0 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
Expand Down
3 changes: 3 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,8 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0=
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
Expand Down Expand Up @@ -1060,6 +1062,7 @@ github.com/rootless-containers/rootlesskit v1.1.1 h1:F5psKWoWY9/VjZ3ifVcaosjvFZJ
github.com/rootless-containers/rootlesskit v1.1.1/go.mod h1:UD5GoA3dqKCJrnvnhVgQQnweMF2qZnf9KLw8EewcMZI=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4=
github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4=
Expand Down
Loading
Loading