Skip to content

Commit

Permalink
v0.6.0 release (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
psampaz authored Apr 9, 2020
1 parent 701cdba commit 8c88474
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 17 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,26 @@ name: CI Workflow
on: [push, pull_request]

jobs:
golangci:
strategy:
matrix:
go-version: [1.14.x]
platform: [ubuntu-latest]
name: golangci-lint
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- run: |
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.24.0 golangci-lint run -v
docker:
strategy:
matrix:
go-version: [1.13.x]
go-version: [1.14.x]
platform: [ubuntu-latest]
name: docker
runs-on: ${{ matrix.platform }}
Expand All @@ -22,7 +38,7 @@ jobs:
tests:
strategy:
matrix:
go-version: [1.11.x, 1.12.x, 1.13.x]
go-version: [1.11.x, 1.12.x, 1.13.x, 1.14.x]
platform: [ubuntu-latest, macos-latest]
name: tests
runs-on: ${{ matrix.platform }}
Expand All @@ -45,7 +61,7 @@ jobs:
coverage:
strategy:
matrix:
go-version: [1.13.x]
go-version: [1.14.x]
platform: [ubuntu-latest]
name: coverage
runs-on: ${{ matrix.platform }}
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ issues:
# golangci.com configuration
# https://github.com/golangci/golangci/wiki/Configuration
service:
golangci-lint-version: 1.20.x # use the fixed version to not introduce new linters unexpectedly
golangci-lint-version: 1.24.x # use the fixed version to not introduce new linters unexpectedly
prepare:
- echo "here I can run custom commands, but no preparation needed for this repo"
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ All notable changes to this project will be documented in this file.

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

## [UNRELEASED] XXXX-XX-XX
## [0.6.0] 2020-04-09
### Added
- Added -style markdown option
- Added tests for Go 1.14

### Changed
- Switch to https://golangci.com/ for static code analysis
- Updated docker base image to 1.14.2
- Reduced docker image size
- Updated version of golangci-lint to 1.24

## [0.5.0] 2019-09-27
### Added
Expand All @@ -26,13 +30,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Added
- Flag '-ci' to exit with non-zero exit code when an outdated dependency is found
- osx in travis

### Removed
- tip version in travis

## [0.2.0] - 2019-04-22
### Added
- Extra column 'VALID TIMESTAMPS' which indicates if the timestamp of the new version is
actually newer that the current one

### Changed
- Packages are now internal

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.13.1-alpine3.10
FROM golang:1.14.2-alpine3.11
RUN apk add --no-cache git
WORKDIR /home
COPY ./ .
RUN CGO_ENABLED=0 GOOS=linux go build -o go-mod-outdated .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w" -o go-mod-outdated .

FROM scratch
WORKDIR /home/
Expand Down
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,28 @@ To output a markdown compatible table, pass the `-style markdown` option
go list -u -m -json all | go-mod-outdated -style markdown
```

**Important note for Go 1.14 users**

If are using Go 1.14 with vendoring you need to pass **-mod=mod** or **-mod=readonly** to the go list command otherwise
you will get the following error:

```
$ go list -u -m -json all
go list -m: can't determine available upgrades using the vendor directory
(Use -mod=mod or -mod=readonly to bypass.)
```

The following will work:

```
go list -u -m -mod=mod -json all | go-mod-outdated
```

```
go list -u -m -mod=readonly -json all | go-mod-outdated
```

### Docker
In the folder where your go.mod lives run
```
Expand Down Expand Up @@ -141,10 +163,8 @@ There is a case where the updated version reported by the go list command is act
go-mod-outdated output includes a column named **VALID TIMESTAMP** which will give an indication when this case happens,
helping application maintainers to avoid upgrading to a version that will break their application.

## Important notes
## Important note

- 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
modules, expect things to break.
- Upgrading an application is a responsibility of the maintainer of the application. Semantic versioning provides a way
to indicate breaking changes, but still everything relies on each module developer to apply correct version tags. Unless
there is a fully automated way to detect breaking changes in a codebase, a good practice to avoid surpises is to write
Expand All @@ -156,6 +176,7 @@ tests and avoid dependencies on modules not well maintained and documented.
- 1.11.x
- 1.12.x
- 1.13.x
- 1.14.x

## Supported operating systems

Expand Down
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/psampaz/go-mod-outdated

go 1.14

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

0 comments on commit 8c88474

Please sign in to comment.