Skip to content

Commit 359c31c

Browse files
authored
Prepare v0.9.0 (#59)
* update dependencies to latest versions * update ci config * add goreleaser * updated changelog and readme * update docker image for goreleaser
1 parent 32fc7a3 commit 359c31c

File tree

11 files changed

+104
-58
lines changed

11 files changed

+104
-58
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,44 +9,45 @@ jobs:
99
name: golangci-lint
1010
runs-on: ${{ matrix.platform }}
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v3
1313
- name: golangci-lint
14-
uses: golangci/golangci-lint-action@v2
14+
uses: golangci/golangci-lint-action@v3
1515
with:
16-
version: v1.37.1
16+
version: v1.50.1
1717
docker:
1818
strategy:
1919
matrix:
20-
go-version: [1.17.x]
20+
go-version: [1.20.x]
2121
platform: [ubuntu-latest]
2222
name: docker
2323
runs-on: ${{ matrix.platform }}
2424
steps:
25-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v3
2626
with:
2727
fetch-depth: 1
28-
- uses: actions/setup-go@v2
28+
- uses: actions/setup-go@v3
2929
with:
3030
go-version: ${{ matrix.go-version }}
3131
- run: |
32+
go build -o go-mod-outdated main.go
3233
docker build -t psampaz/go-mod-outdated .
3334
go list -u -m -json all | docker run --rm -i psampaz/go-mod-outdated
3435
tests:
3536
strategy:
3637
matrix:
37-
go-version: [1.16.x, 1.17.x]
38+
go-version: [1.19.x, 1.20.x]
3839
platform: [ubuntu-latest, macos-latest]
3940
name: tests
4041
runs-on: ${{ matrix.platform }}
4142
steps:
42-
- uses: actions/checkout@v2
43+
- uses: actions/checkout@v3
4344
with:
4445
fetch-depth: 1
45-
- uses: actions/setup-go@v2
46+
- uses: actions/setup-go@v3
4647
with:
4748
go-version: ${{ matrix.go-version }}
4849
- run: |
49-
go get github.com/mfridman/tparse
50+
go install github.com/mfridman/tparse@latest
5051
go test -v -race -cover -json ./... | $(go env GOPATH)/bin/tparse -all
5152
- run: |
5253
go install
@@ -57,15 +58,15 @@ jobs:
5758
coverage:
5859
strategy:
5960
matrix:
60-
go-version: [1.17.x]
61+
go-version: [1.20.x]
6162
platform: [ubuntu-latest]
6263
name: coverage
6364
runs-on: ${{ matrix.platform }}
6465
steps:
65-
- uses: actions/checkout@v2
66+
- uses: actions/checkout@v3
6667
with:
6768
fetch-depth: 1
68-
- uses: actions/setup-go@v2
69+
- uses: actions/setup-go@v3
6970
with:
7071
go-version: ${{ matrix.go-version }}
7172
- run: |

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.idea
22
vendor
3-
go-mod-outdated
3+
go-mod-outdated
4+
dist

.golangci.yml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,16 @@ linters-settings:
4141
- wrapperFunc
4242

4343
linters:
44-
enable-all: true
45-
disable:
46-
- maligned
47-
- prealloc
48-
- gochecknoglobals
49-
- gofmt
50-
- godot
51-
- nlreturn
52-
- gofumpt
53-
- gci
54-
- goerr113
55-
- exhaustivestruct
56-
- paralleltest
57-
- errorlint
58-
- thelper
59-
- wrapcheck
60-
- nestif
44+
disable-all: true
45+
enable:
46+
- errcheck
47+
- gosimple
48+
- govet
49+
- ineffassign
50+
- staticcheck
51+
- typecheck
52+
- unused
53+
- revive
6154

6255
run:
6356
skip-dirs:
@@ -69,11 +62,15 @@ issues:
6962
- text: "weak cryptographic primitive"
7063
linters:
7164
- gosec
65+
- text: "fieldalignment: struct with"
66+
linters:
67+
- govet
68+
7269
exclude-use-default: false
7370

7471
# golangci.com configuration
7572
# https://github.com/golangci/golangci/wiki/Configuration
7673
service:
77-
golangci-lint-version: 1.31.x # use the fixed version to not introduce new linters unexpectedly
74+
golangci-lint-version: 1.50.1 # use the fixed version to not introduce new linters unexpectedly
7875
prepare:
7976
- echo "here I can run custom commands, but no preparation needed for this repo"

.goreleaser.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This is an example .goreleaser.yml file with some sane defaults.
2+
# Make sure to check the documentation at http://goreleaser.com
3+
before:
4+
hooks:
5+
# You may remove this if you don't use go modules.
6+
- go mod download
7+
builds:
8+
-
9+
ldflags:
10+
-s -w
11+
env:
12+
- CGO_ENABLED=0
13+
goos:
14+
- linux
15+
- darwin
16+
archives:
17+
- replacements:
18+
darwin: Darwin
19+
linux: Linux
20+
386: i386
21+
amd64: x86_64
22+
checksum:
23+
name_template: 'checksums.txt'
24+
snapshot:
25+
name_template: "{{ .Tag }}"
26+
changelog:
27+
sort: asc
28+
filters:
29+
exclude:
30+
- '^docs:'
31+
- '^test:'
32+
dockers:
33+
-
34+
goos: linux
35+
goarch: amd64
36+
image_templates:
37+
- "psampaz/go-mod-outdated:latest"
38+
- "psampaz/go-mod-outdated:{{ .Tag }}"

CHANGELOG.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ 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-
## [ΝΕΧΤ] ΧΧΧΧ-ΧΧ-ΧΧ
6+
## [0.9.0] 2023-02-19
77
### Added
8-
8+
- Goreleaser
9+
- Tests for Go 1.19 and 1.20
910
### Changed
1011
- Skip rendering the table if there are no updates to display https://github.com/psampaz/go-mod-outdated/pull/46
11-
12+
- Updated dependencies to latest versions
13+
- Update ci config
1214
### Removed
15+
- Tests for Go 1.16 and 1.17
1316

1417
## [0.8.0] 2021-04-12
1518
### Added

Dockerfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
FROM golang:1.17.8-alpine3.15
1+
FROM golang:1.20.1-alpine3.17
2+
RUN apk update
23
RUN apk add --no-cache git
3-
WORKDIR /home
4-
COPY ./ .
5-
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w" -o go-mod-outdated .
64

75
FROM scratch
86
WORKDIR /home/
9-
COPY --from=0 /home/go-mod-outdated .
10-
ENTRYPOINT ["./go-mod-outdated"]
7+
COPY go-mod-outdated /usr/bin/
8+
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
9+
ENTRYPOINT ["go-mod-outdated"]

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
gorelease-dry:
2+
goreleaser --snapshot --skip-publish --clean
3+
gorelease:
4+
goreleaser release

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,12 @@ there is a fully automated way to detect breaking changes in a codebase, a good
188188
tests and avoid dependencies on modules not well maintained and documented.
189189

190190

191-
## Supported Go versions
191+
## Supported (tested) Go versions
192192

193-
- 1.13.x
194-
- 1.14.x
195-
- 1.15.x
193+
- 1.19.x
194+
- 1.20.x
196195

197-
## Supported operating systems
196+
## Supported (tested) operating systems
198197

199198
- linux
200199
- osx

go.mod

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

3-
go 1.17
3+
go 1.18
44

55
require github.com/olekukonko/tablewriter v0.0.5
66

77
require (
8-
github.com/mattn/go-runewidth v0.0.10 // indirect
9-
github.com/rivo/uniseg v0.2.0 // indirect
10-
)
8+
github.com/mattn/go-runewidth v0.0.14 // indirect
9+
github.com/rivo/uniseg v0.4.3 // indirect
10+
)

go.sum

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
22
github.com/mattn/go-runewidth v0.0.10 h1:CoZ3S2P7pvtP45xOtBw+/mDL2z0RKI576gSkzRRpdGg=
33
github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
4+
github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU=
5+
github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
46
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
57
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
68
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
79
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
8-
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
10+
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
11+
github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw=
12+
github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=

0 commit comments

Comments
 (0)