Skip to content

Commit 4baa07c

Browse files
authored
build: update Go version and dependencies (#26)
This commit updates the Go version requirements for the project to `1.21.x` and `1.22.x` as well as updates various dependencies to their latest compatible versions Dependency changes: - Update `go.mod` to use Go 1.21 and set the toolchain to go 1.22.1 - Update `github.com/google/go-github` to v61.0.0 - Update `github.com/go-git/go-git` to v5.11.0 - Update other dependencies to their latest versions - Regenerate mocks to use new go-git imports Signed-off-by: Amine Hilaly <[email protected]> By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 326c0ea commit 4baa07c

File tree

12 files changed

+298
-380
lines changed

12 files changed

+298
-380
lines changed

.github/workflows/unit-tests.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ jobs:
1616
strategy:
1717
matrix:
1818
go-version:
19-
- "1.13.x"
20-
- "1.14.x"
21-
- "1.15.x"
22-
- "1.16.x"
19+
- "1.21.x"
20+
- "1.22.x"
2321
os:
2422
- ubuntu-latest
2523
- macos-latest

go.mod

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,51 @@
11
module github.com/aws-controllers-k8s/dev-tools
22

3-
go 1.14
3+
go 1.21
4+
5+
toolchain go1.22.1
46

57
require (
68
github.com/ghodss/yaml v1.0.0
7-
github.com/google/go-github/v35 v35.2.0
9+
github.com/go-git/go-billy/v5 v5.5.0
10+
github.com/go-git/go-git/v5 v5.11.0
11+
github.com/google/go-github/v61 v61.0.0
812
github.com/mitchellh/go-homedir v1.1.0
913
github.com/olekukonko/tablewriter v0.0.5
10-
github.com/sirupsen/logrus v1.4.2
11-
github.com/spf13/cobra v1.1.3
12-
github.com/stretchr/testify v1.5.1
13-
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
14-
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
15-
gopkg.in/src-d/go-billy.v4 v4.3.2
16-
gopkg.in/src-d/go-git.v4 v4.13.1
14+
github.com/sirupsen/logrus v1.9.0
15+
github.com/spf13/cobra v1.8.0
16+
github.com/stretchr/testify v1.8.4
17+
golang.org/x/crypto v0.22.0
18+
golang.org/x/oauth2 v0.19.0
19+
)
20+
21+
require (
22+
dario.cat/mergo v1.0.0 // indirect
23+
github.com/Microsoft/go-winio v0.6.1 // indirect
24+
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
25+
github.com/cloudflare/circl v1.3.3 // indirect
26+
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
27+
github.com/davecgh/go-spew v1.1.1 // indirect
28+
github.com/emirpasic/gods v1.18.1 // indirect
29+
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
30+
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
31+
github.com/google/go-querystring v1.1.0 // indirect
32+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
33+
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
34+
github.com/kevinburke/ssh_config v1.2.0 // indirect
35+
github.com/mattn/go-runewidth v0.0.9 // indirect
36+
github.com/pjbgf/sha1cd v0.3.0 // indirect
37+
github.com/pmezard/go-difflib v1.0.0 // indirect
38+
github.com/sergi/go-diff v1.1.0 // indirect
39+
github.com/skeema/knownhosts v1.2.1 // indirect
40+
github.com/spf13/pflag v1.0.5 // indirect
41+
github.com/stretchr/objx v0.5.0 // indirect
42+
github.com/xanzy/ssh-agent v0.3.3 // indirect
43+
golang.org/x/mod v0.12.0 // indirect
44+
golang.org/x/net v0.21.0 // indirect
45+
golang.org/x/sys v0.19.0 // indirect
46+
golang.org/x/term v0.19.0 // indirect
47+
golang.org/x/tools v0.13.0 // indirect
48+
gopkg.in/warnings.v0 v0.1.2 // indirect
49+
gopkg.in/yaml.v2 v2.4.0 // indirect
50+
gopkg.in/yaml.v3 v3.0.1 // indirect
1751
)

go.sum

Lines changed: 141 additions & 323 deletions
Large diffs are not rendered by default.

mocks/open_cloner.go

Lines changed: 33 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mocks/repository_service.go

Lines changed: 60 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/git/git.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ package git
1616
import (
1717
"context"
1818

19+
"github.com/go-git/go-git/v5"
20+
"github.com/go-git/go-git/v5/plumbing/transport"
21+
githttp "github.com/go-git/go-git/v5/plumbing/transport/http"
22+
gitssh "github.com/go-git/go-git/v5/plumbing/transport/ssh"
1923
"golang.org/x/crypto/ssh"
20-
"gopkg.in/src-d/go-git.v4"
21-
"gopkg.in/src-d/go-git.v4/plumbing/transport"
22-
githttp "gopkg.in/src-d/go-git.v4/plumbing/transport/http"
23-
gitssh "gopkg.in/src-d/go-git.v4/plumbing/transport/ssh"
2424
)
2525

2626
var _ OpenCloner = &Git{}

pkg/github/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"errors"
1919
"time"
2020

21-
"github.com/google/go-github/v35/github"
21+
"github.com/google/go-github/v61/github"
2222
"golang.org/x/oauth2"
2323
)
2424

pkg/repository/manager.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ import (
2121
"strings"
2222
"time"
2323

24+
git "github.com/go-git/go-git/v5"
25+
gitconfig "github.com/go-git/go-git/v5/config"
26+
"github.com/go-git/go-git/v5/plumbing/transport"
2427
"github.com/sirupsen/logrus"
25-
git "gopkg.in/src-d/go-git.v4"
26-
gitconfig "gopkg.in/src-d/go-git.v4/config"
27-
"gopkg.in/src-d/go-git.v4/plumbing/transport"
2828

2929
"github.com/aws-controllers-k8s/dev-tools/pkg/config"
3030
ackdevgit "github.com/aws-controllers-k8s/dev-tools/pkg/git"

pkg/repository/manager_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ import (
2020
"fmt"
2121
"testing"
2222

23-
gogithub "github.com/google/go-github/v35/github"
23+
"github.com/go-git/go-git/v5"
24+
gitconfig "github.com/go-git/go-git/v5/config"
25+
"github.com/go-git/go-git/v5/plumbing/transport"
26+
gogithub "github.com/google/go-github/v61/github"
2427
"github.com/stretchr/testify/assert"
2528
"github.com/stretchr/testify/require"
26-
"gopkg.in/src-d/go-git.v4"
27-
gitconfig "gopkg.in/src-d/go-git.v4/config"
28-
"gopkg.in/src-d/go-git.v4/plumbing/transport"
2929

3030
"github.com/aws-controllers-k8s/dev-tools/pkg/config"
3131
ackdevgit "github.com/aws-controllers-k8s/dev-tools/pkg/git"

pkg/repository/repository.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ package repository
1616
import (
1717
"fmt"
1818

19-
"gopkg.in/src-d/go-git.v4"
19+
"github.com/go-git/go-git/v5"
2020
)
2121

2222
// NewRepository returns a pointer to a new repository.

0 commit comments

Comments
 (0)