Skip to content

Commit

Permalink
switch to go modules
Browse files Browse the repository at this point in the history
Signed-off-by: Denys Smirnov <denys@sourced.tech>
  • Loading branch information
Denys Smirnov authored and dennwc committed Apr 17, 2019
1 parent 419407e commit a603a77
Show file tree
Hide file tree
Showing 18 changed files with 194 additions and 443 deletions.
14 changes: 6 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
language: go

go:
- '1.11'
- '1.12.x'

services:
- docker

env:
- BBLFSHD_VERSION=v2.11.8
global:
- GO111MODULE=on
- BBLFSHD_VERSION=v2.12.1

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

script:
Expand All @@ -23,4 +21,4 @@ script:
- go run test.go --bblfshd $BBLFSHD_VERSION ci-build

after_success:
- bblfsh-sdk push ci-build
- go run github.com/bblfsh/sdk/v3/cmd/bblfsh-sdk push ci-build
12 changes: 11 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# This file can be used directly with Docker.
#
# Prerequisites:
# dep ensure --vendor-only
# go mod vendor
# bblfsh-sdk release
#
# However, the preferred way is:
# go run ./build.go driver:tag
#
# This will regenerate all necessary files before building the driver.

#==============================
# Stage 1: Native Driver Build
Expand Down Expand Up @@ -29,11 +36,14 @@ FROM golang:1.10 as driver
ENV DRIVER_REPO=github.com/bblfsh/csharp-driver
ENV DRIVER_REPO_PATH=/go/src/$DRIVER_REPO

ADD go.* $DRIVER_REPO_PATH/
ADD vendor $DRIVER_REPO_PATH/vendor
ADD driver $DRIVER_REPO_PATH/driver

WORKDIR $DRIVER_REPO_PATH/

ENV GO111MODULE=on GOFLAGS=-mod=vendor

# build server binary
RUN go build -o /tmp/driver ./driver/main.go
# build tests
Expand Down
Loading

0 comments on commit a603a77

Please sign in to comment.