Skip to content

Commit 8c88474

Browse files
authored
v0.6.0 release (#38)
1 parent 701cdba commit 8c88474

File tree

7 files changed

+63
-17
lines changed

7 files changed

+63
-17
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,26 @@ name: CI Workflow
22
on: [push, pull_request]
33

44
jobs:
5+
golangci:
6+
strategy:
7+
matrix:
8+
go-version: [1.14.x]
9+
platform: [ubuntu-latest]
10+
name: golangci-lint
11+
runs-on: ${{ matrix.platform }}
12+
steps:
13+
- uses: actions/checkout@v1
14+
with:
15+
fetch-depth: 1
16+
- uses: actions/setup-go@v1
17+
with:
18+
go-version: ${{ matrix.go-version }}
19+
- run: |
20+
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.24.0 golangci-lint run -v
521
docker:
622
strategy:
723
matrix:
8-
go-version: [1.13.x]
24+
go-version: [1.14.x]
925
platform: [ubuntu-latest]
1026
name: docker
1127
runs-on: ${{ matrix.platform }}
@@ -22,7 +38,7 @@ jobs:
2238
tests:
2339
strategy:
2440
matrix:
25-
go-version: [1.11.x, 1.12.x, 1.13.x]
41+
go-version: [1.11.x, 1.12.x, 1.13.x, 1.14.x]
2642
platform: [ubuntu-latest, macos-latest]
2743
name: tests
2844
runs-on: ${{ matrix.platform }}
@@ -45,7 +61,7 @@ jobs:
4561
coverage:
4662
strategy:
4763
matrix:
48-
go-version: [1.13.x]
64+
go-version: [1.14.x]
4965
platform: [ubuntu-latest]
5066
name: coverage
5167
runs-on: ${{ matrix.platform }}

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ issues:
6363
# golangci.com configuration
6464
# https://github.com/golangci/golangci/wiki/Configuration
6565
service:
66-
golangci-lint-version: 1.20.x # use the fixed version to not introduce new linters unexpectedly
66+
golangci-lint-version: 1.24.x # use the fixed version to not introduce new linters unexpectedly
6767
prepare:
6868
- echo "here I can run custom commands, but no preparation needed for this repo"

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
55

6-
## [UNRELEASED] XXXX-XX-XX
6+
## [0.6.0] 2020-04-09
77
### Added
88
- Added -style markdown option
9+
- Added tests for Go 1.14
10+
911
### Changed
10-
- Switch to https://golangci.com/ for static code analysis
12+
- Updated docker base image to 1.14.2
13+
- Reduced docker image size
14+
- Updated version of golangci-lint to 1.24
1115

1216
## [0.5.0] 2019-09-27
1317
### Added
@@ -26,13 +30,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
2630
### Added
2731
- Flag '-ci' to exit with non-zero exit code when an outdated dependency is found
2832
- osx in travis
33+
2934
### Removed
3035
- tip version in travis
3136

3237
## [0.2.0] - 2019-04-22
3338
### Added
3439
- Extra column 'VALID TIMESTAMPS' which indicates if the timestamp of the new version is
3540
actually newer that the current one
41+
3642
### Changed
3743
- Packages are now internal
3844

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM golang:1.13.1-alpine3.10
1+
FROM golang:1.14.2-alpine3.11
22
RUN apk add --no-cache git
33
WORKDIR /home
44
COPY ./ .
5-
RUN CGO_ENABLED=0 GOOS=linux go build -o go-mod-outdated .
5+
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w" -o go-mod-outdated .
66

77
FROM scratch
88
WORKDIR /home/

README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,28 @@ To output a markdown compatible table, pass the `-style markdown` option
8080
go list -u -m -json all | go-mod-outdated -style markdown
8181
```
8282

83+
**Important note for Go 1.14 users**
84+
85+
If are using Go 1.14 with vendoring you need to pass **-mod=mod** or **-mod=readonly** to the go list command otherwise
86+
you will get the following error:
87+
88+
```
89+
$ go list -u -m -json all
90+
91+
go list -m: can't determine available upgrades using the vendor directory
92+
(Use -mod=mod or -mod=readonly to bypass.)
93+
```
94+
95+
The following will work:
96+
97+
```
98+
go list -u -m -mod=mod -json all | go-mod-outdated
99+
```
100+
101+
```
102+
go list -u -m -mod=readonly -json all | go-mod-outdated
103+
```
104+
83105
### Docker
84106
In the folder where your go.mod lives run
85107
```
@@ -141,10 +163,8 @@ There is a case where the updated version reported by the go list command is act
141163
go-mod-outdated output includes a column named **VALID TIMESTAMP** which will give an indication when this case happens,
142164
helping application maintainers to avoid upgrading to a version that will break their application.
143165

144-
## Important notes
166+
## Important note
145167

146-
- Go's module system will be finalized in Go 1.13 version. Since this tool relies on the output of Go's list related to
147-
modules, expect things to break.
148168
- Upgrading an application is a responsibility of the maintainer of the application. Semantic versioning provides a way
149169
to indicate breaking changes, but still everything relies on each module developer to apply correct version tags. Unless
150170
there is a fully automated way to detect breaking changes in a codebase, a good practice to avoid surpises is to write
@@ -156,6 +176,7 @@ tests and avoid dependencies on modules not well maintained and documented.
156176
- 1.11.x
157177
- 1.12.x
158178
- 1.13.x
179+
- 1.14.x
159180

160181
## Supported operating systems
161182

go.mod

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module github.com/psampaz/go-mod-outdated
22

3+
go 1.14
4+
35
require (
4-
github.com/mattn/go-runewidth v0.0.4 // indirect
5-
github.com/olekukonko/tablewriter v0.0.1
6+
github.com/mattn/go-runewidth v0.0.9 // indirect
7+
github.com/olekukonko/tablewriter v0.0.4
68
)

go.sum

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y=
2-
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
3-
github.com/olekukonko/tablewriter v0.0.1 h1:b3iUnf1v+ppJiOfNX4yxxqfWKMQPZR5yoh8urCTFX88=
4-
github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
1+
github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
2+
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
3+
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
4+
github.com/olekukonko/tablewriter v0.0.4 h1:vHD/YYe1Wolo78koG299f7V/VAS08c6IpCLn+Ejf/w8=
5+
github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA=

0 commit comments

Comments
 (0)