-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathMakefile
56 lines (45 loc) · 1.73 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
54
55
56
DEV_VERSION=4.3.0-dev
ENV=env GOOS=linux
TIMESTAMP:=$(shell date -u +%Y%m%d%H%M%S)
CELLS_CLIENT_VERSION?=${DEV_VERSION}.${TIMESTAMP}
MOD_UPDATE?=v5-dev
.PHONY: all clean main linux arm arm64 win darwin xgo
main:
env CGO_ENABLED=0 go build -a -trimpath\
-ldflags "-X github.com/pydio/cells-client/v4/common.Version=${CELLS_CLIENT_VERSION}" \
-o cec .
linux:
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -trimpath \
-ldflags "-X github.com/pydio/cells-client/v4/common.Version=${CELLS_CLIENT_VERSION}" \
-o cec .
arm:
env CGO_ENABLED=0 GOOS=linux GOARM=7 GOARCH=arm go build -a -trimpath \
-ldflags "-X github.com/pydio/cells-client/v4/common.Version=${CELLS_CLIENT_VERSION}" \
-o cec .
arm64:
env CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -a -trimpath \
-ldflags "-X github.com/pydio/cells-client/v4/common.Version=${CELLS_CLIENT_VERSION}" \
-o cec .
win:
env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -a -trimpath \
-ldflags "-X github.com/pydio/cells-client/v4/common.Version=${CELLS_CLIENT_VERSION}" \
-o cec.exe .
darwin:
env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -a -trimpath \
-ldflags "-X github.com/pydio/cells-client/v4/common.Version=${CELLS_CLIENT_VERSION}" \
-o cec .
dev:
env CGO_ENABLED=0 go build -tags dev \
-ldflags "-X github.com/pydio/cells-client/v4/common.Version=${DEV_VERSION}"\
-o cec\
.
## We assume the sdk and cells client projects are in the same folder...
mod-local:
go mod edit -replace github.com/pydio/cells-sdk-go/v4=../cells-sdk-go
mod-update:
go mod edit -dropreplace github.com/pydio/cells-sdk-go/v4
go get -d github.com/pydio/cells-sdk-go/v4@${MOD_UPDATE}
go mod download github.com/pydio/cells-sdk-go/v4
GONOSUMDB=* go mod tidy
clean:
rm -f cec