Skip to content

Commit 71ccd1d

Browse files
Denys Smirnovdennwc
Denys Smirnov
authored andcommitted
switch to go modules
Signed-off-by: Denys Smirnov <[email protected]>
1 parent fe0fdfb commit 71ccd1d

18 files changed

+230
-453
lines changed

.travis.yml

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
language: go
22

33
go:
4-
- '1.11'
4+
- '1.12.x'
55

66
services:
77
- docker
88

99
env:
10-
- BBLFSHD_VERSION=v2.11.8
10+
global:
11+
- GO111MODULE=on
12+
- BBLFSHD_VERSION=v2.12.1
1113

1214
install:
13-
- curl -L https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 > $GOPATH/bin/dep
14-
- chmod +x $GOPATH/bin/dep
15-
- dep ensure --vendor-only
16-
- go get ./vendor/gopkg.in/bblfsh/sdk.v2/cmd/...
17-
- go install ./vendor/gopkg.in/bblfsh/sdk.v2/cmd/...
15+
- go mod download
1816
- docker pull bblfsh/bblfshd:$BBLFSHD_VERSION
1917

2018
script:
@@ -23,4 +21,4 @@ script:
2321
- go run test.go --bblfshd $BBLFSHD_VERSION ci-build
2422

2523
after_success:
26-
- bblfsh-sdk push ci-build
24+
- go run github.com/bblfsh/sdk/v3/cmd/bblfsh-sdk push ci-build

Dockerfile

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
# This file can be used directly with Docker.
2+
#
13
# Prerequisites:
2-
# dep ensure --vendor-only
4+
# go mod vendor
35
# bblfsh-sdk release
6+
#
7+
# However, the preferred way is:
8+
# go run ./build.go driver:tag
9+
#
10+
# This will regenerate all necessary files before building the driver.
411

512
#==============================
613
# Stage 1: Native Driver Build
@@ -35,11 +42,14 @@ FROM golang:1.10-alpine as driver
3542
ENV DRIVER_REPO=github.com/bblfsh/bash-driver
3643
ENV DRIVER_REPO_PATH=/go/src/$DRIVER_REPO
3744

45+
ADD go.* $DRIVER_REPO_PATH/
3846
ADD vendor $DRIVER_REPO_PATH/vendor
3947
ADD driver $DRIVER_REPO_PATH/driver
4048

4149
WORKDIR $DRIVER_REPO_PATH/
4250

51+
ENV GO111MODULE=on GOFLAGS=-mod=vendor
52+
4353
# build server binary
4454
RUN go build -o /tmp/driver ./driver/main.go
4555
# build tests

0 commit comments

Comments
 (0)