Skip to content

Commit 1e4f13d

Browse files
authored
Merge pull request #306 from vmarkovtsev/master
Repair the plugins
2 parents 2687a40 + 7761367 commit 1e4f13d

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.travis.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ script:
6363
- hercules --burndown --couples --devs --quiet --pb https://github.com/src-d/hercules > 1.pb
6464
- cp 1.pb 2.pb
6565
- hercules combine 1.pb 2.pb > 12.pb
66-
- #(hercules generate-plugin -n MyPlug -o myplug && cd myplug && make)
67-
- #(cd contrib/_plugin_example && make)
66+
- (hercules generate-plugin -n MyPlug -o myplug && cd myplug && GOFLAGS="-tags=tensorflow" make)
67+
- hercules --plugin myplug/my_plug.so --help | grep my-plug
68+
- (cd contrib/_plugin_example && GOBIN=../.. make)
6869
- hercules --burndown --burndown-files --burndown-people --couples --devs --quiet https://github.com/src-d/hercules | labours -m all -o out --backend Agg --disable-projector
6970
- hercules --burndown --burndown-files --burndown-people --couples --devs --quiet --pb https://github.com/src-d/hercules | labours -f pb -m all -o out --backend Agg --disable-projector
7071
- # hercules --sentiment --quiet --languages Python https://github.com/src-d/hercules > /dev/null

cmd/hercules/generate_plugin.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ var generatePluginCmd = &cobra.Command{
111111
all: {{.shlib}}
112112
113113
{{.shlib}}: {{.output}} {{.protogo}}
114-
` + "\t" + `go build -buildmode=plugin -linkshared {{.output}} {{.protogo}}
114+
` + "\t" + `go build -buildmode=plugin ${GOFLAGS} {{.output}} {{.protogo}}
115115
116116
{{.protogo}}: {{.proto}}
117117
` + "\t" + `PATH=$$PATH:$$GOBIN protoc --gogo_out=. --proto_path=. {{.proto}}

contrib/_plugin_example/Makefile

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
GO111MODULE = on
2+
13
all: churn_analysis.so
24

35
churn_analysis.so: churn_analysis.go churn_analysis.pb.go
4-
go build -buildmode=plugin -linkshared churn_analysis.go churn_analysis.pb.go
6+
go build -buildmode=plugin churn_analysis.go churn_analysis.pb.go
57

68
churn_analysis.pb.go: churn_analysis.proto
7-
PATH=$$PATH:$$GOPATH/bin protoc --gogo_out=. --proto_path=. churn_analysis.proto
9+
PATH=$$PATH:$$GOBIN protoc --gogo_out=. --proto_path=. churn_analysis.proto

0 commit comments

Comments
 (0)