Skip to content
This repository was archived by the owner on Jun 25, 2019. It is now read-only.

Commit f92d5ae

Browse files
committed
Fix build process to support go1.11
1 parent d7f0a60 commit f92d5ae

File tree

7 files changed

+113
-20
lines changed

7 files changed

+113
-20
lines changed

.travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ go:
44
- 1.8
55
- 1.9
66
- "1.10"
7+
- "master"
78
go_import_path: github.com/gonium/gosdm630
89
env:
910
- "PATH=/home/travis/gopath/bin:$PATH"
1011
before_install:
12+
- echo $TRAVIS_GO_VERSION
1113
- go get -u github.com/golang/dep/cmd/dep
1214
install:
1315
- make dep
14-
- dep ensure
1516
script:
1617
- make

Gopkg.lock

+88-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
version = "1.1.1"
3131

3232
[[constraint]]
33-
branch = "master"
3433
name = "github.com/goburrow/modbus"
34+
version = "0.1"
3535

3636
[[constraint]]
3737
name = "github.com/gorilla/websocket"

Makefile

+10-8
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,30 @@ build: assets binaries
99

1010
binaries:
1111
@echo "Building for host platform"
12-
@$(BUILD)
12+
$(BUILD)
1313
@echo "Created binaries:"
1414
@ls -1 bin
1515

1616
assets:
1717
@echo "Generating embedded assets"
18-
@$(GOPATH)/bin/embed http.go
18+
$(GOPATH)/bin/embed http.go
1919

2020
release: test clean assets
21-
@./build.sh
21+
./build.sh
2222

2323
test:
2424
@echo "Running testsuite"
25-
@go test
25+
env GO111MODULE=on go test
2626

2727
clean:
28-
@rm -rf bin/ pkg/ *.zip
28+
rm -rf bin/ pkg/ *.zip
2929

3030
dep:
31-
@echo "Installing embed tool"
32-
@go get -u github.com/aprice/embed/cmd/embed
3331
@echo "Installing vendor dependencies"
34-
@dep ensure
32+
dep ensure
33+
34+
@echo "Installing embed tool"
35+
env GO111MODULE=on go get github.com/aprice/embed/cmd/embed
36+
env GO111MODULE=on go install github.com/aprice/embed/cmd/embed
3537

3638
.PHONY: all build binaries assets release test clean dep

build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function build {
1717
if [ ! -z "$(ls -A .)" ]; then rm *; fi
1818
for i in $CMDS; do
1919
# echo GOOS=$GOOS GOARCH=$GOARCH GOARM=$GOARM go build $i
20-
GOOS=$GOOS GOARCH=$GOARCH GOARM=$GOARM go build $i
20+
GOOS=$GOOS GOARCH=$GOARCH GOARM=$GOARM GO111MODULE=on go build $i
2121
done
2222
cd ..
2323

go.mod

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ require (
1212
github.com/gorilla/websocket v1.4.0
1313
github.com/jcuga/golongpoll v0.0.0-20160821025152-6f70b008d155
1414
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d
15-
github.com/spf13/pflag v1.0.2 // indirect
15+
github.com/spf13/pflag v1.0.3 // indirect
1616
github.com/tdewolff/minify v2.3.5+incompatible // indirect
1717
github.com/tdewolff/parse v2.3.3+incompatible // indirect
18-
golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3
19-
golang.org/x/sys v0.0.0-20180918153733-ee1b12c67af4
18+
golang.org/x/net v0.0.0-20181003013248-f5e5bdd77824
19+
golang.org/x/sys v0.0.0-20181004145325-8469e314837c
2020
gopkg.in/urfave/cli.v1 v1.20.0
2121
)

tools.go

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// +build tools
2+
3+
package sdm630
4+
5+
import (
6+
_ "github.com/aprice/embed/cmd/embed"
7+
_ "github.com/aprice/embed/loader"
8+
)

0 commit comments

Comments
 (0)