-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (39 loc) · 1.23 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
# go-sisimai/Makefile
# __ __ _ __ _ _
# | \/ | __ _| | _____ / _(_) | ___
# | |\/| |/ _` | |/ / _ \ |_| | |/ _ \
# | | | | (_| | < __/ _| | | __/
# |_| |_|\__,_|_|\_\___|_| |_|_|\___|
# -------------------------------------------------------------------------------------------------
SHELL := /bin/sh
TIME := $(shell date '+%F')
NAME := sisimai
WGET := wget -c
CURL := curl -L
CHMOD := chmod
GO := go
CP := cp
RM := rm -f
GOROOT := $(shell echo $$GOROOT)
GOPATH := $(shell echo $$GOPATH)
DOMAIN := libsisimai.org
.DEFAULT_GOAL = git-status
REPOS_TARGETS = git-status git-push git-commit-amend git-tag-list git-diff git-reset-soft \
git-rm-cached git-branch
# -------------------------------------------------------------------------------------------------
.PHONY: clean
init:
test -e $(NAME)/go.mod || cd ./$(NAME) && $(GO) mod init $(NAME)
build:
$(GO) build lib$(NAME).go
test:
go test `find sisimai -type f -name '*_test.go' | xargs dirname | sort | uniq`
$(REPOS_TARGETS):
$(MAKE) -f Repository.mk $@
fix-commit-message: git-commit-amend
cancel-the-latest-commit: git-reset-soft
remove-added-file: git-rm-cached
diff push branch:
@$(MAKE) git-$@
clean:
go clean -testcache