-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (46 loc) · 1.6 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
fpath="/usr/local/share/zsh/site-functions"
exedir="/usr/local/bin/"
build:
go mod tidy
go build -o find-where-to-go ./find-where-to-go-cli/main.go
go build -o where-to ./where-to-cli/main.go
install:
mv ./find-where-to-go "${exedir}"
mv ./where-to "${exedir}"
zsh-completions:
mkdir -p "${fpath}"
where-to --completion zsh > _where-to
mv ./_where-to "${fpath}/_where-to"
cp ./.completions/zsh/_to "${fpath}"
bash-completions:
mkdir -p "${fpath}"
where-to --completion bash > _where-to
# mv ./_where-to "${fpath}/_where-to"
cp ./.completions/zsh/_to "${fpath}"
release:
mkdir -p ./bin/macos
GOOS=darwin GOARCH=amd64 go build -o bin/macos/find-where-to-go ./find-where-to-go-cli/main.go
GOOS=darwin GOARCH=amd64 go build -o bin/macos/where-to ./where-to-cli/main.go
mkdir -p ./bin/macosArm
GOOS=darwin GOARCH=arm64 go build -o bin/macosArm/find-where-to-go ./find-where-to-go-cli/main.go
GOOS=darwin GOARCH=arm64 go build -o bin/macosArm/where-to ./where-to-cli/main.go
mkdir -p ./bin/linux
GOOS=linux GOARCH=amd64 go build -o bin/linux/find-where-to-go ./find-where-to-go-cli/main.go
GOOS=linux GOARCH=amd64 go build -o bin/linux/where-to ./where-to-cli/main.go
tar -cJf ./bin/macos.tar.xz ./bin/macos
rm -rf ./bin/macos
tar -cJf ./bin/macosArm.tar.xz ./bin/macosArm
rm -rf ./bin/macosArm
tar -cJf ./bin/linux.tar.xz ./bin/linux
rm -rf ./bin/linux
clean:
rm -rf ./bin
rm -rf ./find-where-to-go
rm -rf ./where-to
rm -rf "${exedir}/find-where-to-go"
rm -rf "${exedir}/where-to"
rm -rf "${fpath}/_to"
rm -rf "${fpath}/_where-to"
rm -rf "${fpath}/_find-where-to-go"
test:
go test -count=1 ./...