Skip to content

Commit 50cba36

Browse files
authored
Merge pull request #26 from RTradeLtd/mod
mod: add go.mod
2 parents a067b1d + 403b182 commit 50cba36

36 files changed

+718
-1006
lines changed

.travis.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
language: go
22
go:
3-
- "1.11"
3+
- "1.12"
44
services:
55
- docker
66
compiler:
77
- gcc
88
env:
9-
- TF_VERSION=linux-x86_64-1.12.0 LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
9+
global:
10+
- TF_VERSION=linux-x86_64-1.12.0 LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
11+
- GO111MODULE=on
1012

1113
install:
1214
# tesseract
1315
- bash setup/scripts/tesseract_install.sh
1416
# tensorflow
1517
- bash setup/scripts/tensorflow_install.sh
16-
# golang dependencies
17-
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
18-
- go get -u golang.org/x/lint/golint
19-
- go get -u -v -tags nopie github.com/gen2brain/go-fitz # https://github.com/gen2brain/go-fitz#build-tags
20-
- dep ensure -v
18+
# golang dependencies - run separately, to make sure we get the right tags
19+
# see https://github.com/gen2brain/go-fitz#build-tags
20+
- go get -u -v -tags nopie github.com/gen2brain/go-fitz
2121

2222
before_script:
2323
- go vet -tags nopie ./...
@@ -27,9 +27,8 @@ before_script:
2727

2828
script:
2929
- go fmt ./...
30-
- golint $(go list ./... | grep -v /vendor/) # golint doesn't ignore vendor
31-
#- go test -tags nopie -race -short -coverprofile=coverage.txt ./...
32-
- go test -tags nopie -short -coverprofile=coverage.txt ./...
30+
- go run golang.org/x/lint/golint $(go list ./... | grep -v /vendor/) # golint doesn't ignore vendor
31+
- go test -tags nopie -race -short -coverprofile=coverage.txt ./...
3332

3433
after_success:
3534
- bash <(curl -s https://codecov.io/bash)

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ARG LENSVERSION
66
ARG TENSORFLOW_DIST
77

88
# Mount source code
9-
ENV BUILD_HOME=/go/src/github.com/RTradeLtd/Lens
9+
ENV BUILD_HOME=/go/src/github.com/RTradeLtd/Lens GO111MODULE=on
1010
ADD . ${BUILD_HOME}
1111
WORKDIR ${BUILD_HOME}
1212

@@ -19,8 +19,7 @@ ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
1919
## Tesseract
2020
RUN bash setup/scripts/tesseract_install.sh
2121
## Golang dependencies
22-
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
23-
RUN dep ensure -v
22+
RUN go mod vendor
2423
## Go-fitz
2524
RUN go get -u -tags gcc7 github.com/gen2brain/go-fitz
2625

0 commit comments

Comments
 (0)