This repository has been archived by the owner on Mar 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathMakefile
75 lines (59 loc) · 2.24 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
all:
init:
rm -f .git/hooks/pre-push
rm -f .git/hooks/pre-commit
ln -s ../../githooks/pre-push .git/hooks/pre-push
ln -s ../../githooks/pre-commit .git/hooks/pre-commit
go get github.com/samuel/go-thrift/parser
go get github.com/spf13/cobra
go get github.com/jteeuwen/go-bindata/...
test: buildTpl
go test ./...
test-go-gen: buildTpl
rm -rf thriftgotest
go build
./tgen gen -l go -i example/golang/Enum.thrift -o ../../../
./tgen gen -l go -i example/golang/Const.thrift -o ../../../
./tgen gen -l go -i example/golang/IncludeEnum.thrift -o ../../../
./tgen gen -l go -i example/golang/Types.thrift -o ../../../
./tgen gen -l go -r --validate -i example/golang/Service.thrift -o ../../../
./tgen gen -l go -i example/golang/SimpleArguments.thrift -o ../../../
./tgen gen -l go -w=false -i example/golang/UnusedInclude.thrift -o ../../../
go install github.com/ezbuy/tgen/thriftgotest/...
test-go-ezrpc: test-go-gen
ezrpc gen -l go -i example/golang/Service.thrift -o ../../../
go install github.com/ezbuy/tgen/thriftgotest/...
buildTpl:
go-bindata -nometadata -o tmpl/bindata.go -ignore bindata.go -pkg tmpl tmpl/*
debugTpl:
go-bindata -nometadata -o tmpl/bindata.go -ignore bindata.go -pkg tmpl -debug tmpl/*
genjava: buildTpl
go build
./tgen gen -l java -i example/java/ShipForMe.thrift -o ./javaoutput
genjavajsonrpc: buildTpl
go build
./tgen gen -l java -m jsonrpc -i example/java/ShipForMe.thrift -o ./javaoutputjsonrpc
genjavarest: buildTpl
go build
./tgen gen -l java -m rest -i example/java/ShipForMe.thrift -o ./javaoutputrest
gen-swift-rest: buildTpl
rm -rf output-swift-rest
go run main.go gen -l swift -m rest -i example/swift/Example.thrift -o ./output-swift-rest
gen-swift-jsonrpc: buildTpl
rm -rf output-swift-jsonrpc
go run main.go gen -l swift -m jsonrpc -i example/swift/Example.thrift -o ./output-swift-jsonrpc
gen-swift: gen-swift-rest gen-swift-jsonrpc
genjavascriptrest: buildTpl
go build
./tgen gen -l javascript -m rest -i example/javascript/FlashSales.thrift -o ./javascriptoutputrest
gengrpc: buildTpl
go build
./tgen gen -l grpc -i example/swift/Example.thrift -o ./example/swift
clean:
go clean
rm -rf ./output-swift-rest
rm -rf javaoutputrest
rm -rf javaoutputjsonrpc
build: buildTpl
go clean
go build