add task to view man page

move man tasks into Taskfile.man.yaml
This commit is contained in:
onyx-and-iris 2025-04-29 18:35:58 +01:00
parent 3540c60c4b
commit 8cf969c906
2 changed files with 20 additions and 5 deletions

17
Taskfile.man.yaml Normal file
View File

@ -0,0 +1,17 @@
version: '3'
tasks:
default:
desc: View man page
cmds:
- task: view
view:
desc: View man page
cmds:
- go run . --man | man -l -
generate:
desc: Generate man page
cmds:
- go run . --man > {{.PROGRAM}}.1

View File

@ -1,5 +1,8 @@
version: '3'
includes:
man: Taskfile.man.yaml
vars:
PROGRAM: gobs-cli
SHELL: '{{if eq .OS "Windows_NT"}}powershell{{end}}'
@ -50,8 +53,3 @@ tasks:
desc: Clean the build artifacts
cmds:
- '{{.SHELL}} rm -r {{.BIN_DIR}}'
man:
desc: Generate man page
cmds:
- go run . --man > {{.PROGRAM}}.1