-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (23 loc) · 925 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
VERSION:=$(shell git describe --tags --abbrev=0)
HASH:=$(shell git rev-list -1 HEAD)
PACKAGE:=github.com/AppleGamer22/cocainate
LDFLAGS:=-ldflags="-X '$(PACKAGE)/commands.Version=$(subst v,,$(VERSION))' -X '$(PACKAGE)/commands.Hash=$(HASH)'"
test:
go clean -testcache
go test -v -race -cover ./session ./ps ./commands
debug:
go build $(LDFLAGS) .
completion:
go run . completion bash > cocainate.bash
go run . completion fish > cocainate.fish
go run . completion zsh > cocainate.zsh
go run . completion powershell > cocainate.ps1
manual:
# go run ./utils/replace cocainate.1 -b "vVERSION" -a "$(VERSION)"
# go run ./utils/replace cocainate.1 -b "DATE" -a "$(shell go run ./utils/date)"
# go run . manual | man -l -
go run . manual > cocainate.1
clean:
rm -rf cocainate bin dist cocainate.bash cocainate.fish cocainate.zsh cocainate.ps1
go clean -testcache -cache
.PHONY: debug test clean completion manual