Switch to Cobra

Also:
- Fixed the Makefile
- Added a Taskfile.yml (see: https://taskfile.dev)
- Updated the manual page

Signed-off-by: Shin'ya Minazuki <shinyoukai@laidback.moe>
This commit is contained in:
2025-12-30 12:10:46 -03:00
parent 60688d7a0e
commit f045e36119
12 changed files with 168 additions and 84 deletions

View File

@@ -1,13 +1,10 @@
VERSION = `git describe --tags` || echo MIRAI
GO = go
GOFLAGS = -v -buildvcs=false -buildmode=exe -ldflags "-w -X `${GO} list`.Version=${VERSION}"
GOFLAGS = -v -buildvcs=false -buildmode=exe -ldflags='-w -X "`${GO} list`.Version=${VERSION}" -X "`${GO} list`.Revision=${REVISION}"'
build: mikuru-login mikuru-post
VERSION ?= `git describe --tags`
REVISION ?= `git rev-list --all | wc -l`
mikuru-login:
${GO} build ${GOFLAGS} ./cmd/$@
mikuru-post:
${GO} build ${GOFLAGS} ./cmd/$@
build:
@${GO} build ${GOFLAGS} -o mikuru ./cmd
clean:
rm -f mikuru-*
@rm -f mikuru