add: man page and installation make step

This commit is contained in:
2023-10-26 17:27:43 +02:00
parent 973338baff
commit 896066f8a7
4 changed files with 94 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
BUILD_TARGET = ./bin/ BUILD_TARGET = ./bin/
INSTALL_PATH = /usr/local/
GITW = main.go GITW = main.go
all: clean test build all: clean test build
@@ -19,3 +20,7 @@ build: build-gitw
build-gitw: build-gitw:
go build -ldflags "-s -w" -o $(BUILD_TARGET)gitw $(GITW) go build -ldflags "-s -w" -o $(BUILD_TARGET)gitw $(GITW)
install:
cp $(BUILD_TARGET)gitw $(INSTALL_PATH)bin/gitw
cp docs/gitw.1 $(INSTALL_PATH)man/man1/gitw.1

View File

@@ -4,7 +4,22 @@ Cli tool to sync git issues and milstones with taskwarrior tasks.
## Building ## Building
This project uses `make` to build. You can run `make` to build the application. You can run `make run` to start the cli after building the application. `make install` will require previledges to install the created binary and documentation to the corresponding places. The variable `INSTALL_PATH` in the [Makefile](Makefile) contains the directory used for the installation of the application. This project uses `make` to build. You can run `make` to build the application.
You can run `make run` to start the cli after building the application.
`make install` will require previledges to install the created binary and
documentation to the corresponding places. The variable `INSTALL_PATH` in the
[Makefile](Makefile) contains the directory used for the installation of the
application.
## Installation
Run the following commands after cloning the repository in the root directory of
your local copy:
```sh
make
sudo make install
```
## Dependencies ## Dependencies

View File

@@ -19,7 +19,7 @@ var (
Use: "gitw", Use: "gitw",
Short: "Git issue and milestone integration for taskwarrior", Short: "Git issue and milestone integration for taskwarrior",
Long: `Gitwarrior is a CLI tool to extend the taskwarrior tasks to synch issues and milestones. Long: `Gitwarrior is a CLI tool to extend the taskwarrior tasks to synch issues and milestones.
Gitwarrior requires requires the following uda's to be defined: last_gitw_update(date), git_number(number), git_type(string), git_comment_ids(string).`, Gitwarrior requires the following uda's to be defined: last_gitw_update(date), git_number(number), git_type(string), git_comment_ids(string).`,
} }
) )

View File

@@ -0,0 +1,72 @@
.\" This is the groff documentation source for gitw
.\"
.\" Preview with: groff -man -Tascii gitw.1
.\" or: man -l gitw.1
.\"
.TH GITW 1 "2023-10-26" "User Commands"
.SH NAME
gitw \- Git issue and milestone integration for taskwarrior
.SH SYNOPSIS
.B gitw
.RI COMMAND
.
.SH DESCRIPTION
.nr PI 4n
.B gitw
Gitwarrior is a CLI tool to extend the taskwarrior tasks to synch issues and milestones. Gitwarrior requires the following uda's to be defined:
.IP \[bu]
last_gitw_update(date)
.IP \[bu]
git_number(number)
.IP \[bu]
git_type(string)
.IP \[bu]
git_comment_ids(string)
.PP
It should be run inside of a git working copy (ideally in the root directory of the git repository).
.PP
gitw is a automation and wrapper for taskwarrior.
.
.SH COMMANDS
.B push
Push changes of local taskwarrior to gitea repository. Tasks which have all the uda's set correctly will be updated on the gitea instance according to the local git working copy.
.PP
.B pull
Pull changes from the gitea instance with information from the configuration file and the derived information from the local git working copy.
.PP
.B task <args>
Wrapper for taskwarrior, which wraps the provided taskwarrior filter and commands provided via
.I <args>
in the corresponding context for the current git working copy (which is used as a project name).
.PP
.I NOTE:
The taskwarrior context needs to be created before with the name of the context set to the project name of the git repository.
.PP
.B help
Print a help menu for all the commands available in
.B gitw
.
.SH EXAMPLES
gitw pull --dry-run
.PP
gitw push
.PP
gitw task
.PP
gitw --help
.PP
gitw --version
.PP
Pull changes from the corresponding gitea instance into the local taskwarrior tasks.
.
.SH AUTHOR
Written by Yves Biener.
Man page by Yves Biener.
.
.SH BUGS
Please report bugs at
.IR https://gitea.yves-biener.de/yves-biener/gitwarrior/issues
.
.SH COPYRIGHT
This software is provided by Yves Biener ''as is'' and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall Yves Biener be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.