Skip to content

Commit

Permalink
go: gimme installs new go release
Browse files Browse the repository at this point in the history
  • Loading branch information
hunchback committed Sep 10, 2019
1 parent 4deef78 commit 5ad687e
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 18 deletions.
21 changes: 11 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ endef

VERSION?=$(shell $(VERSION_CMD))
GO_GET:=CC= GOARCH= go get
GOVENDOR:=${GOPATH}/bin/govendor
GOFMT:=gofmt -s -w
GOVENDOR:=GOFLAGS= ${GOPATH}/bin/govendor
BUILD_CMD?=${GOVENDOR}
BUILD_ID:=$(shell echo 0x$$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n'))
SKYDIVE_GITHUB:=github.com/skydive-project/skydive
Expand Down Expand Up @@ -281,13 +282,13 @@ flow/flow.pb.go: flow/flow.proto filters/filters.proto
sed -e 's/type ICMPLayer struct {/\/\/ gendecoder\ntype ICMPLayer struct {/' -i $@
sed -e 's/type IPMetric struct {/\/\/ gendecoder\ntype IPMetric struct {/' -i $@
sed -e 's/type TCPMetric struct {/\/\/ gendecoder\ntype TCPMetric struct {/' -i $@
gofmt -s -w $@
$(GOFMT) $@

websocket/structmessage.pb.go: websocket/structmessage.proto
$(call PROTOC_GEN,$<)

sed -e 's/type StructMessage struct {/type StructMessage struct { XXX_state structMessageState `json:"-"`/' -i websocket/structmessage.pb.go
gofmt -s -w $@
$(GOFMT) $@

.proto: govendor flow/layers/dns.pb.go flow/layers/vrrpv2.pb.go flow/layers/dhcpv4.pb.go flow/flow.pb.go filters/filters.pb.go websocket/structmessage.pb.go

Expand Down Expand Up @@ -354,7 +355,7 @@ npm.install:

statics/bindata.go: .typescript ebpf.build $(shell find statics -type f \( ! -iname "bindata.go" \))
$(call VENDOR_RUN,${GO_BINDATA_GITHUB}) go-bindata ${GO_BINDATA_FLAGS} -nometadata -o statics/bindata.go -pkg=statics -ignore=bindata.go $(BINDATA_DIRS)
gofmt -w -s statics/bindata.go
$(GOFMT) statics/bindata.go

.PHONY: .vppbinapi
.vppbinapi: binapigenerator
Expand Down Expand Up @@ -558,18 +559,18 @@ govendor:
.PHONY: fmt
fmt: govendor genlocalfiles
@echo "+ $@"
@test -z "$$($(GOVENDOR) fmt +local)" || \
(echo "+ please format Go code with 'gofmt -s'" && /bin/false)
$(GOVENDOR) fmt +local || \
(echo "+ please format Go code with '$(GOFMT)'" && /bin/false)

.PHONY: vet
vet: govendor
@echo "+ $@"
test -z "$$($(GOVENDOR) tool vet $$( \
test -z "$$($(GOVENDOR) vet $$( \
$(GOVENDOR) list -no-status +local \
| perl -pe 's|$(SKYDIVE_GITHUB)/?||g' \
| grep -v '^tests') 2>&1 \
| grep -v '^$(SKYDIVE_GITHUB)/tests' \
| grep -v '^$(SKYDIVE_GITHUB)/contrib/collectd' \
) 2>&1 \
| tee /dev/stderr \
| grep -v '^flow/probes/afpacket/' \
| grep -v 'exit status 1' \
)"

Expand Down
2 changes: 1 addition & 1 deletion contrib/ansible/roles/skydive_dev/tasks/gimme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- name: run gimme in bash profile
lineinfile:
path: /home/vagrant/.bash_profile
line: 'eval "$(gimme 1.10.8)"'
line: 'eval "$(gimme 1.13.0)"'

- name: set GOPATH
lineinfile:
Expand Down
2 changes: 1 addition & 1 deletion packetinjector/pcap.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ func (p *PcapPacketGenerator) PacketSource() chan *Packet {
func NewPcapPacketGenerator(pp *PacketInjectionRequest) (*PcapPacketGenerator, error) {
return &PcapPacketGenerator{
PacketInjectionRequest: pp,
close: make(chan bool, 1),
close: make(chan bool, 1),
}, nil
}
4 changes: 2 additions & 2 deletions packetinjector/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ func (o *onDemandPacketInjectServer) CreateTask(srcNode *graph.Node, resource ty

metadata := &InjectionMetadata{
PacketInjectionRequest: *pp,
ID: pp.UUID,
State: "active",
ID: pp.UUID,
State: "active",
}

if o.graph.UpdateMetadata(srcNode, "PacketInjections", func(obj interface{}) bool {
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/create-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ echo "--- BINARIES ---"
make static WITH_EBPF=true

# We need at least Go 1.11.0 to generate swagger spec
eval "$(gimme 1.12.7)"
eval "$(gimme 1.13.0)"
make swagger

git reset --hard
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/install-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ curl -sL -o ~/bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master
chmod +x ~/bin/gimme

# before changing this be sure that it will not break the RHEL packaging
eval "$(gimme 1.10.3)"
eval "$(gimme 1.13.0)"

export GOPATH=$WORKSPACE
export PATH=$PATH:$GOPATH/bin
Expand Down
4 changes: 2 additions & 2 deletions websocket/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ func (s *StructSpeaker) OnMessage(c Speaker, m Message) {

func newStructSpeaker(c Speaker, logger logging.Logger) *StructSpeaker {
s := &StructSpeaker{
Speaker: c,
Speaker: c,
structSpeakerEventDispatcher: newStructSpeakerEventDispatcher(),
nsSubscribed: make(map[string]bool),
replyChan: make(map[string]chan *StructMessage),
Expand Down Expand Up @@ -497,7 +497,7 @@ func (s *StructServer) OnDisconnected(c Speaker) {
// NewStructServer returns a new StructServer
func NewStructServer(server *Server) *StructServer {
s := &StructServer{
Server: server,
Server: server,
structSpeakerPoolEventDispatcher: newStructSpeakerPoolEventDispatcher(server),
}

Expand Down

0 comments on commit 5ad687e

Please sign in to comment.