File tree Expand file tree Collapse file tree 4 files changed +48
-20
lines changed
Expand file tree Collapse file tree 4 files changed +48
-20
lines changed Original file line number Diff line number Diff line change 1- language : go
2-
3- go :
4- - " 1.11.x"
5- - " 1.12.x"
6-
1+ services :
2+ - docker
73os :
84 - linux
95 - osx
10-
11- before_script :
12- - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.16.0
13-
14- script :
15- - golangci-lint run
16- - go test ./... -race -coverprofile=coverage.txt -covermode=atomic
17- - go install
18- - mkdir hugo && cd hugo && wget https://raw.githubusercontent.com/gohugoio/hugo/v0.53/go.mod
19- - env GO111MODULE=on go list -u -m -json all | go-mod-outdated
20-
21- after_success :
22- - bash <(curl -s https://codecov.io/bash)
6+ language : go
7+ go :
8+ - 1.11.x
9+ - 1.12.x
10+ jobs :
11+ include :
12+ -
13+ after_success :
14+ - " bash <(curl -s https://codecov.io/bash)"
15+ before_script :
16+ - " curl sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.16.0"
17+ script :
18+ - " golangci-lint run"
19+ - " go test ./... -race -coverprofile=coverage.txt -covermode=atomic"
20+ - " go install"
21+ - " mkdir hugo && cd hugo && wget https://raw.githubusercontent.com/gohugoio/hugo/v0.53/go.mod"
22+ - " env GO111MODULE=on go list -u -m -json all | go-mod-outdated"
23+ stage : " testing"
24+ -
25+ script :
26+ - " docker build -t psampaz/go-mod-outdated ."
27+ - " go list -u -m -json all | docker run --rm -i psampaz/go-mod-outdated"
28+ stage : " docker"
Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
33
44The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ )
55
6+ ## [ 0.4.0] 2019-08-12
7+ ### Added
8+ - Run go-mod-outdated using Docker
9+
610## [ 0.3.0] 2019-05-01
711### Added
812- Flag '-ci' to exit with non-zero exit code when an outdated dependency is found
Original file line number Diff line number Diff line change 1+ FROM golang:1.12.7-alpine3.10
2+ RUN apk add --no-cache git
3+ WORKDIR /home
4+ COPY ./ .
5+ RUN CGO_ENABLED=0 GOOS=linux go build -o go-mod-outdated .
6+
7+ FROM scratch
8+ WORKDIR /home/
9+ COPY --from=0 /home/go-mod-outdated .
10+ ENTRYPOINT ["./go-mod-outdated" ]
Original file line number Diff line number Diff line change @@ -73,7 +73,15 @@ If you want to see only the direct depedencies that have updates run
7373```
7474go list -u -m -json all | go-mod-outdated -update -direct
7575```
76-
76+ ### Docker
77+ In the folder where your go.mod lives run
78+ ```
79+ go list -u -m -json all | docker run -i psampaz/go-mod-outdated
80+ ```
81+ To use parameters just append
82+ ```
83+ go list -u -m -json all | docker run -i psampaz/go-mod-outdated -update
84+ ```
7785### CI pipelines
7886
7987Using the -ci flag will the make the command exit with none zero code, breaking this way your ci pipelines.
You can’t perform that action at this time.
0 commit comments