Skip to content

Commit

Permalink
Fixing hpcloud#168:
Browse files Browse the repository at this point in the history
* Migrated to go mod as fsnotify has moved away from gopkg.in
* Updated vendor folder so it works with go version <= 1.11
* Added extra Dockerfile to test building with go 1.9 as that is the lowest, working version now
  • Loading branch information
Per Abich committed Mar 17, 2020
1 parent a1dbeea commit a6a8363
Show file tree
Hide file tree
Showing 327 changed files with 157,224 additions and 374 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.git/
.idea/
.test/
*.iml
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.test
.go

.idea/
*.iml
12 changes: 5 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ script:
- go test -race -v ./...

go:
- 1.5
- 1.6
- 1.7
- 1.8
- 1.11
- 1.12
- 1.13
- 1.14
- stable
- tip

matrix:
allow_failures:
- go: tip

install:
- go get gopkg.in/fsnotify/fsnotify.v1
- go get gopkg.in/tomb.v1
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# API v1 (gopkg.in/hpcloud/tail.v1)

## March, 2020

* Migrated to go mod as fsnotify has moved away from gopkg.in
* Updated vendor folder so it works with go version <= 1.11
* Added extra Dockerfile to test building with go 1.9 as that is the lowest, working version now

## April, 2016

* Migrated to godep, as depman is not longer supported
Expand Down
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
FROM golang

RUN mkdir -p $GOPATH/src/github.com/hpcloud/tail/
ADD . $GOPATH/src/github.com/hpcloud/tail/

# expecting to fetch dependencies successfully.
RUN go get -v github.com/hpcloud/tail
ADD . /src/tail/
WORKDIR /src/tail

# expecting to run the test successfully.
RUN go test -v github.com/hpcloud/tail
RUN go test -race -v ./...

# expecting to install successfully
RUN go install -v github.com/hpcloud/tail
RUN go install -v github.com/hpcloud/tail/cmd/gotail
RUN go install -v .
RUN go install -v ./cmd/gotail

RUN $GOPATH/bin/gotail -h || true

Expand Down
19 changes: 19 additions & 0 deletions Dockerfile-go-1.9
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM golang:1.9

RUN mkdir -p $GOPATH/src/github.com/hpcloud/tail/
ADD . $GOPATH/src/github.com/hpcloud/tail/

# expecting to fetch dependencies successfully.
RUN go get -v github.com/hpcloud/tail

# expecting to run the test successfully.
RUN go test -race -v github.com/hpcloud/tail

# expecting to install successfully
RUN go install -v github.com/hpcloud/tail
RUN go install -v github.com/hpcloud/tail/cmd/gotail

RUN $GOPATH/bin/gotail -h || true

ENV PATH $GOPATH/bin:$PATH
CMD ["gotail"]
15 changes: 0 additions & 15 deletions Godeps/Godeps.json

This file was deleted.

5 changes: 0 additions & 5 deletions Godeps/Readme

This file was deleted.

8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ test: *.go
fmt:
gofmt -w .

mod:
go mod tidy

vendor:
go mod vendor
# Run the test in an isolated environment.
fulltest:
docker build -t hpcloud/tail -f Dockerfile-go-1.9 .
docker build -t hpcloud/tail .

all: fmt mod vendor test
9 changes: 9 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module github.com/hpcloud/tail

go 1.11

require (
github.com/fsnotify/fsnotify v1.4.9
golang.org/x/sys v0.0.0-20200316230553-a7d97aace0b0 // indirect
gopkg.in/tomb.v1 v1.0.0-20140529071818-c131134a1947
)
12 changes: 12 additions & 0 deletions vendor/github.com/fsnotify/fsnotify/.editorconfig

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/github.com/fsnotify/fsnotify/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions vendor/github.com/fsnotify/fsnotify/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a6a8363

Please sign in to comment.