Skip to content

Commit 9c6c847

Browse files
committed
Migrate to go modules + Improve GitHub actions workflows
1 parent 0cfc4c2 commit 9c6c847

11 files changed

Lines changed: 147 additions & 44 deletions

File tree

.github/dependabot.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: "gomod"
5+
directory: "/"
6+
target-branch: "develop"
7+
schedule:
8+
interval: "daily"
9+
timezone: "Europe/London"
10+
time: "03:00"
11+
labels:
12+
- "PR • MAINTENANCE"
13+
assignees:
14+
- "andyone"
15+
reviewers:
16+
- "andyone"
17+
18+
- package-ecosystem: "github-actions"
19+
directory: "/"
20+
target-branch: "develop"
21+
schedule:
22+
interval: "daily"
23+
timezone: "Europe/London"
24+
time: "04:00"
25+
labels:
26+
- "PR • MAINTENANCE"
27+
assignees:
28+
- "andyone"
29+
reviewers:
30+
- "andyone"

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
strategy:
2121
matrix:
22-
go: [ '1.16.x', '1.17.x' ]
22+
go: [ '1.17.x', '1.18.x' ]
2323

2424
steps:
2525
- name: Set up Go
@@ -35,7 +35,7 @@ jobs:
3535
echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
3636
3737
- name: Checkout
38-
uses: actions/checkout@v2
38+
uses: actions/checkout@v3
3939
with:
4040
path: ${{env.SRC_DIR}}
4141

@@ -61,7 +61,7 @@ jobs:
6161
- name: Set up Go
6262
uses: actions/setup-go@v2
6363
with:
64-
go-version: '1.16.x'
64+
go-version: '1.17.x'
6565
id: go
6666

6767
- name: Setup PATH
@@ -71,7 +71,7 @@ jobs:
7171
echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
7272
7373
- name: Checkout
74-
uses: actions/checkout@v2
74+
uses: actions/checkout@v3
7575
with:
7676
path: ${{env.SRC_DIR}}
7777

@@ -93,7 +93,7 @@ jobs:
9393

9494
steps:
9595
- name: Code checkout
96-
uses: actions/checkout@v2
96+
uses: actions/checkout@v3
9797

9898
- name: Login to DockerHub
9999
uses: docker/login-action@v1
@@ -117,7 +117,7 @@ jobs:
117117

118118
steps:
119119
- name: Checkout
120-
uses: actions/checkout@v2
120+
uses: actions/checkout@v3
121121

122122
- name: Check dockerfiles with Hadolint
123123
uses: essentialkaos/hadolint-action@v1
@@ -132,7 +132,7 @@ jobs:
132132

133133
steps:
134134
- name: Checkout
135-
uses: actions/checkout@v2
135+
uses: actions/checkout@v3
136136

137137
- name: Login to DockerHub
138138
uses: docker/login-action@v1

Makefile

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
################################################################################
22

3-
# This Makefile generated by GoMakeGen 1.3.2 using next command:
4-
# gomakegen .
3+
# This Makefile generated by GoMakeGen 1.5.1 using next command:
4+
# gomakegen --mod .
55
#
66
# More info: https://kaos.sh/gomakegen
77

88
################################################################################
99

10+
export GO111MODULE=on
11+
1012
.DEFAULT_GOAL := help
11-
.PHONY = fmt vet all clean git-config deps help
13+
.PHONY = fmt vet all clean deps mod-init mod-update mod-vendor help
1214

1315
################################################################################
1416

@@ -23,12 +25,17 @@ install: ## Install all binaries
2325
uninstall: ## Uninstall all binaries
2426
rm -f /usr/bin/sslcli
2527

26-
git-config: ## Configure git redirects for stable import path services
27-
git config --global http.https://pkg.re.followRedirects true
28+
deps: mod-update ## Download dependencies
29+
30+
mod-init: ## Initialize new module
31+
go mod init
32+
go mod tidy
33+
34+
mod-update: ## Download modules to local cache
35+
go mod download
2836

29-
deps: git-config ## Download dependencies
30-
go get -d -v pkg.re/essentialkaos/ek.v12
31-
go get -d -v pkg.re/essentialkaos/sslscan.v13
37+
mod-vendor: ## Make vendored copy of dependencies
38+
go mod vendor
3239

3340
fmt: ## Format source code with gofmt
3441
find . -name "*.go" -exec gofmt -s -w {} \;
@@ -44,6 +51,6 @@ help: ## Show this info
4451
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
4552
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-12s\033[0m %s\n", $$1, $$2}'
4653
@echo -e ''
47-
@echo -e '\033[90mGenerated by GoMakeGen 1.3.2\033[0m\n'
54+
@echo -e '\033[90mGenerated by GoMakeGen 1.5.1\033[0m\n'
4855

4956
################################################################################

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#### From source
2626

27-
To build the SSLScan Client from scratch, make sure you have a working Go 1.16+ workspace ([instructions](https://golang.org/doc/install)), then:
27+
To build the SSLScan Client from scratch, make sure you have a working Go 1.17+ workspace ([instructions](https://golang.org/doc/install)), then:
2828

2929
```
3030
go get github.com/essentialkaos/sslcli

cli/cli.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package cli
22

33
// ////////////////////////////////////////////////////////////////////////////////// //
44
// //
5-
// Copyright (c) 2021 ESSENTIAL KAOS //
5+
// Copyright (c) 2022 ESSENTIAL KAOS //
66
// Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0> //
77
// //
88
// ////////////////////////////////////////////////////////////////////////////////// //
@@ -17,26 +17,26 @@ import (
1717
"strings"
1818
"time"
1919

20-
"pkg.re/essentialkaos/ek.v12/fmtc"
21-
"pkg.re/essentialkaos/ek.v12/fmtutil"
22-
"pkg.re/essentialkaos/ek.v12/fsutil"
23-
"pkg.re/essentialkaos/ek.v12/options"
24-
"pkg.re/essentialkaos/ek.v12/strutil"
25-
"pkg.re/essentialkaos/ek.v12/usage"
26-
"pkg.re/essentialkaos/ek.v12/usage/completion/bash"
27-
"pkg.re/essentialkaos/ek.v12/usage/completion/fish"
28-
"pkg.re/essentialkaos/ek.v12/usage/completion/zsh"
29-
"pkg.re/essentialkaos/ek.v12/usage/man"
30-
"pkg.re/essentialkaos/ek.v12/usage/update"
31-
32-
"pkg.re/essentialkaos/sslscan.v13"
20+
"github.com/essentialkaos/ek/v12/fmtc"
21+
"github.com/essentialkaos/ek/v12/fmtutil"
22+
"github.com/essentialkaos/ek/v12/fsutil"
23+
"github.com/essentialkaos/ek/v12/options"
24+
"github.com/essentialkaos/ek/v12/strutil"
25+
"github.com/essentialkaos/ek/v12/usage"
26+
"github.com/essentialkaos/ek/v12/usage/completion/bash"
27+
"github.com/essentialkaos/ek/v12/usage/completion/fish"
28+
"github.com/essentialkaos/ek/v12/usage/completion/zsh"
29+
"github.com/essentialkaos/ek/v12/usage/man"
30+
"github.com/essentialkaos/ek/v12/usage/update"
31+
32+
"github.com/essentialkaos/sslscan/v13"
3333
)
3434

3535
// ////////////////////////////////////////////////////////////////////////////////// //
3636

3737
const (
3838
APP = "SSLScan Client"
39-
VER = "2.7.0"
39+
VER = "2.7.1"
4040
DESC = "Command-line client for the SSL Labs API"
4141
)
4242

cli/details.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package cli
22

33
// ////////////////////////////////////////////////////////////////////////////////// //
44
// //
5-
// Copyright (c) 2021 ESSENTIAL KAOS //
5+
// Copyright (c) 2022 ESSENTIAL KAOS //
66
// Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0> //
77
// //
88
// ////////////////////////////////////////////////////////////////////////////////// //
@@ -12,14 +12,14 @@ import (
1212
"strings"
1313
"time"
1414

15-
"pkg.re/essentialkaos/ek.v12/fmtc"
16-
"pkg.re/essentialkaos/ek.v12/fmtutil"
17-
"pkg.re/essentialkaos/ek.v12/pluralize"
18-
"pkg.re/essentialkaos/ek.v12/sliceutil"
19-
"pkg.re/essentialkaos/ek.v12/strutil"
20-
"pkg.re/essentialkaos/ek.v12/timeutil"
15+
"github.com/essentialkaos/ek/v12/fmtc"
16+
"github.com/essentialkaos/ek/v12/fmtutil"
17+
"github.com/essentialkaos/ek/v12/pluralize"
18+
"github.com/essentialkaos/ek/v12/sliceutil"
19+
"github.com/essentialkaos/ek/v12/strutil"
20+
"github.com/essentialkaos/ek/v12/timeutil"
2121

22-
"pkg.re/essentialkaos/sslscan.v13"
22+
"github.com/essentialkaos/sslscan/v13"
2323
)
2424

2525
// ////////////////////////////////////////////////////////////////////////////////// //

cli/encoder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package cli
22

33
// ////////////////////////////////////////////////////////////////////////////////// //
44
// //
5-
// Copyright (c) 2021 ESSENTIAL KAOS //
5+
// Copyright (c) 2022 ESSENTIAL KAOS //
66
// Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0> //
77
// //
88
// ////////////////////////////////////////////////////////////////////////////////// //

common/sslcli.spec

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
Summary: Pretty awesome command-line client for public SSLLabs API
5050
Name: sslcli
51-
Version: 2.7.0
51+
Version: 2.7.1
5252
Release: 0%{?dist}
5353
Group: Applications/System
5454
License: Apache License, Version 2.0
@@ -60,7 +60,7 @@ Source100: checksum.sha512
6060

6161
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
6262

63-
BuildRequires: golang >= 1.14
63+
BuildRequires: golang >= 1.17
6464

6565
Provides: %{name} = %{version}-%{release}
6666

@@ -132,6 +132,11 @@ fi
132132
################################################################################
133133

134134
%changelog
135+
* Tue Mar 29 2022 Anton Novojilov <andy@essentialkaos.com> - 2,7,1-0
136+
- Removed pkg.re usage
137+
- Added module info
138+
- Added Dependabot configuration
139+
135140
* Wed Jan 13 2021 Anton Novojilov <andy@essentialkaos.com> - 2.7.0-0
136141
- sslscan package updated to v13
137142

go.mod

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module github.com/essentialkaos/sslcli
2+
3+
go 1.17
4+
5+
require (
6+
github.com/essentialkaos/ek/v12 v12.42.1
7+
github.com/essentialkaos/sslscan/v13 v13.1.1
8+
)
9+
10+
require (
11+
github.com/andybalholm/brotli v1.0.4 // indirect
12+
github.com/klauspost/compress v1.15.0 // indirect
13+
github.com/valyala/bytebufferpool v1.0.0 // indirect
14+
github.com/valyala/fasthttp v1.34.0 // indirect
15+
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 // indirect
16+
)

go.sum

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY=
2+
github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
3+
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
4+
github.com/essentialkaos/check v1.2.1 h1:avvyFy/1acUNwfxwuOLsHeCjfXtMygtbu0lVDr3nxFs=
5+
github.com/essentialkaos/check v1.2.1/go.mod h1:PhxzfJWlf5L/skuyhzBLIvjMB5Xu9TIyDIsqpY5MvB8=
6+
github.com/essentialkaos/ek/v12 v12.42.1 h1:h3PPy0XNXUj1IsEid/p9IzaF0o5hZEGOBFh7XZawAyg=
7+
github.com/essentialkaos/ek/v12 v12.42.1/go.mod h1:Cv/tOZshmFg4pMJnBkg4aW/WyYhzzc41qzZIfk5RSi4=
8+
github.com/essentialkaos/go-linenoise/v3 v3.3.5/go.mod h1:g4X3LhT83XT4h7xwrCLclAdMkJvS9qWBQTGNdS6y4vo=
9+
github.com/essentialkaos/sslscan/v13 v13.1.1 h1:ic02wruXM5IqkWJ8IvDxrdLYSrTe0EGwDQCryBxxTNU=
10+
github.com/essentialkaos/sslscan/v13 v13.1.1/go.mod h1:kKofHxVvSMXfPKXPgtTYXNxi+t9XbV7ZxldSC6oj5dE=
11+
github.com/klauspost/compress v1.15.0 h1:xqfchp4whNFxn5A4XFyyYtitiWI8Hy5EW59jEwcyL6U=
12+
github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
13+
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
14+
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
15+
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
16+
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
17+
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
18+
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
19+
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
20+
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
21+
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
22+
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
23+
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
24+
github.com/valyala/fasthttp v1.34.0 h1:d3AAQJ2DRcxJYHm7OXNXtXt2as1vMDfxeIcFvhmGGm4=
25+
github.com/valyala/fasthttp v1.34.0/go.mod h1:epZA5N+7pY6ZaEKRmstzOuYJx9HI8DI1oaCGZpdH4h0=
26+
github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
27+
golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
28+
golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
29+
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
30+
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
31+
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
32+
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
33+
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
34+
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
35+
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
36+
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 h1:OH54vjqzRWmbJ62fjuhxy7AxFFgoHN0/DPc/UrL8cAs=
37+
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
38+
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
39+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
40+
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
41+
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
42+
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
43+
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
44+
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=

0 commit comments

Comments
 (0)