forked from wpueschel/gitrc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (26 loc) · 898 Bytes
/
Makefile
File metadata and controls
35 lines (26 loc) · 898 Bytes
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
GOCMD=go
GOBUILD=${GOCMD} build
GOCLEAN=${GOCMD} clean
GOTEST=${GOCMD} test
GOGET=${GOCMD} get
BINARY_NAME=gitrc
VERSION=${shell git describe --tag}
BUILD_DIR=${GOPATH}/src/github.com/wpueschel/${BINARY}
GOARCH=amd64
LDFLAGS= -ldflags "-s -X main.version=${VERSION}"
all: dep windows darwin linux
linux:
GOOS=linux GOARCH=${GOARCH} ${GOBUILD} ${LDFLAGS} -o ${BINARY_NAME}-linux-${GOARCH} . ; \
darwin:
GOOS=darwin GOARCH=${GOARCH} ${GOBUILD} ${LDFLAGS} -o ${BINARY_NAME}-darwin-${GOARCH} . ; \
windows:
GOOS=windows GOARCH=${GOARCH} ${GOBUILD} ${LDFLAGS} -o ${BINARY_NAME}-windows-${GOARCH}.exe . ; \
dep:
${GOGET} "code.gitea.io/sdk/..."
${GOGET} "github.com/xanzy/go-gitlab"
${GOGET} "github.com/google/go-github/github"
${GOGET} "golang.org/x/oauth2"
${GOGET} "gopkg.in/src-d/go-git.v4"
${GOGET} "gopkg.in/src-d/go-git.v4/plumbing/transport"
clean:
-rm -f ${BINARY_NAME}-*