Skip to content

Commit 3a0793a

Browse files
authored
Merge pull request #135 from concourse/update-deps
Update deps and use Go 1.24
2 parents 3794ff5 + e33adc7 commit 3a0793a

12 files changed

Lines changed: 139 additions & 88 deletions

check_command_test.go

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

33
import (
4-
. "github.com/onsi/ginkgo"
4+
. "github.com/onsi/ginkgo/v2"
55
. "github.com/onsi/gomega"
66

77
"github.com/google/go-github/v66/github"

github.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ import (
1616
"golang.org/x/oauth2"
1717
)
1818

19-
// Last run with counterfeiter v6
20-
//go:generate counterfeiter -o fakes/fake_git_hub.go . GitHub
21-
19+
//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o fakes/fake_git_hub.go . GitHub
2220
type GitHub interface {
2321
ListReleases() ([]*github.RepositoryRelease, error)
2422
GetReleaseByTag(tag string) (*github.RepositoryRelease, error)

github_graphql.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func (g *GitHubClient) listReleasesV4EnterPrice() ([]*github.RepositoryRelease,
3232
} `graphql:"repository(owner:$repositoryOwner,name:$repositoryName)"`
3333
}
3434

35-
vars := map[string]interface{}{
35+
vars := map[string]any{
3636
"repositoryOwner": githubv4.String(g.owner),
3737
"repositoryName": githubv4.String(g.repository),
3838
"releaseCursor": (*githubv4.String)(nil),
@@ -103,7 +103,7 @@ func (g *GitHubClient) listReleasesV4() ([]*github.RepositoryRelease, error) {
103103
} `graphql:"repository(owner:$repositoryOwner,name:$repositoryName)"`
104104
}
105105

106-
vars := map[string]interface{}{
106+
vars := map[string]any{
107107
"repositoryOwner": githubv4.String(g.owner),
108108
"repositoryName": githubv4.String(g.repository),
109109
"releaseCursor": (*githubv4.String)(nil),

github_test.go

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ package resource_test
22

33
import (
44
"fmt"
5-
"io/ioutil"
5+
"io"
66
"net/http"
77
"net/url"
88
"time"
99

1010
. "github.com/concourse/github-release-resource"
1111

12-
. "github.com/onsi/ginkgo"
12+
. "github.com/onsi/ginkgo/v2"
1313
. "github.com/onsi/gomega"
1414

1515
"github.com/google/go-github/v66/github"
@@ -276,9 +276,36 @@ var _ = Describe("GitHub Client", func() {
276276
Expect(releases).To(HaveLen(3))
277277
Expect(server.ReceivedRequests()).To(HaveLen(2))
278278
Expect(releases).To(Equal([]*github.RepositoryRelease{
279-
{TagName: github.String("xyz"), Name: github.String("xyz"), Draft: github.Bool(false), Prerelease: github.Bool(false), ID: github.Int64(32095103), CreatedAt: &github.Timestamp{time.Date(2010, time.October, 01, 00, 58, 07, 0, time.UTC)}, PublishedAt: &github.Timestamp{time.Date(2010, time.October, 02, 15, 39, 53, 0, time.UTC)}, URL: github.String("https://github.com/xyz/xyz/releases/tag/xyz")},
280-
{TagName: github.String("xyz"), Name: github.String("xyz"), Draft: github.Bool(false), Prerelease: github.Bool(false), ID: github.Int64(30230659), CreatedAt: &github.Timestamp{time.Date(2010, time.August, 27, 13, 55, 36, 0, time.UTC)}, PublishedAt: &github.Timestamp{time.Date(2010, time.August, 27, 17, 18, 06, 0, time.UTC)}, URL: github.String("https://github.com/xyz/xyz/releases/tag/xyz")},
281-
{TagName: github.String("xyq"), Name: github.String("xyq"), Draft: github.Bool(false), Prerelease: github.Bool(false), ID: github.Int64(33222243), CreatedAt: &github.Timestamp{time.Date(2010, time.October, 10, 01, 01, 07, 0, time.UTC)}, PublishedAt: &github.Timestamp{time.Date(2010, time.October, 10, 15, 39, 53, 0, time.UTC)}, URL: github.String("https://github.com/xyq/xyq/releases/tag/xyq")},
279+
{
280+
TagName: github.String("xyz"),
281+
Name: github.String("xyz"),
282+
Draft: github.Bool(false),
283+
Prerelease: github.Bool(false),
284+
ID: github.Int64(32095103),
285+
CreatedAt: &github.Timestamp{Time: time.Date(2010, time.October, 01, 00, 58, 07, 0, time.UTC)},
286+
PublishedAt: &github.Timestamp{Time: time.Date(2010, time.October, 02, 15, 39, 53, 0, time.UTC)},
287+
URL: github.String("https://github.com/xyz/xyz/releases/tag/xyz"),
288+
},
289+
{
290+
TagName: github.String("xyz"),
291+
Name: github.String("xyz"),
292+
Draft: github.Bool(false),
293+
Prerelease: github.Bool(false),
294+
ID: github.Int64(30230659),
295+
CreatedAt: &github.Timestamp{Time: time.Date(2010, time.August, 27, 13, 55, 36, 0, time.UTC)},
296+
PublishedAt: &github.Timestamp{Time: time.Date(2010, time.August, 27, 17, 18, 06, 0, time.UTC)},
297+
URL: github.String("https://github.com/xyz/xyz/releases/tag/xyz"),
298+
},
299+
{
300+
TagName: github.String("xyq"),
301+
Name: github.String("xyq"),
302+
Draft: github.Bool(false),
303+
Prerelease: github.Bool(false),
304+
ID: github.Int64(33222243),
305+
CreatedAt: &github.Timestamp{Time: time.Date(2010, time.October, 10, 01, 01, 07, 0, time.UTC)},
306+
PublishedAt: &github.Timestamp{Time: time.Date(2010, time.October, 10, 15, 39, 53, 0, time.UTC)},
307+
URL: github.String("https://github.com/xyq/xyq/releases/tag/xyq"),
308+
},
282309
}))
283310
})
284311
})
@@ -574,7 +601,7 @@ var _ = Describe("GitHub Client", func() {
574601
Expect(err).NotTo(HaveOccurred())
575602
defer readCloser.Close()
576603

577-
body, err := ioutil.ReadAll(readCloser)
604+
body, err := io.ReadAll(readCloser)
578605
Expect(err).NotTo(HaveOccurred())
579606
Expect(string(body)).To(Equal(fileContents))
580607
})
@@ -613,7 +640,7 @@ var _ = Describe("GitHub Client", func() {
613640
Expect(err).NotTo(HaveOccurred())
614641
defer readCloser.Close()
615642

616-
body, err := ioutil.ReadAll(readCloser)
643+
body, err := io.ReadAll(readCloser)
617644
Expect(err).NotTo(HaveOccurred())
618645
Expect(string(body)).To(Equal(redirectFileContents))
619646
})
@@ -635,7 +662,7 @@ var _ = Describe("GitHub Client", func() {
635662
Expect(err).NotTo(HaveOccurred())
636663
defer readCloser.Close()
637664

638-
body, err := ioutil.ReadAll(readCloser)
665+
body, err := io.ReadAll(readCloser)
639666
Expect(err).NotTo(HaveOccurred())
640667
Expect(string(body)).To(Equal(redirectFileContents))
641668
})
@@ -663,7 +690,7 @@ var _ = Describe("GitHub Client", func() {
663690
Expect(err).NotTo(HaveOccurred())
664691
defer readCloser.Close()
665692

666-
body, err := ioutil.ReadAll(readCloser)
693+
body, err := io.ReadAll(readCloser)
667694
Expect(err).NotTo(HaveOccurred())
668695
Expect(string(body)).To(Equal(redirectFileContents))
669696
})
@@ -745,7 +772,7 @@ var _ = Describe("GitHub Client", func() {
745772
Expect(err).NotTo(HaveOccurred())
746773
defer readCloser.Close()
747774

748-
body, err := ioutil.ReadAll(readCloser)
775+
body, err := io.ReadAll(readCloser)
749776
Expect(err).NotTo(HaveOccurred())
750777
Expect(string(body)).To(Equal(redirectFileContents))
751778
})

go.mod

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,39 @@
11
module github.com/concourse/github-release-resource
22

3-
go 1.23
3+
go 1.24.0
44

5-
toolchain go1.23.2
5+
toolchain go1.24.1
66

77
require (
88
github.com/Masterminds/semver v1.5.0
99
github.com/cppforlife/go-semi-semantic v0.0.0-20160921010311-576b6af77ae4
1010
github.com/google/go-github/v66 v66.0.0
11+
github.com/maxbrunsfeld/counterfeiter/v6 v6.11.2
1112
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db
12-
github.com/onsi/ginkgo v1.14.2
13-
github.com/onsi/gomega v1.34.2
13+
github.com/onsi/ginkgo/v2 v2.23.0
14+
github.com/onsi/gomega v1.36.2
1415
github.com/shurcooL/githubv4 v0.0.0-20210922025249-6831e00d857f
1516
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f
1617
)
1718

1819
require (
19-
github.com/fsnotify/fsnotify v1.4.9 // indirect
20+
github.com/go-logr/logr v1.4.2 // indirect
21+
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
2022
github.com/golang/protobuf v1.5.2 // indirect
2123
github.com/google/go-cmp v0.6.0 // indirect
2224
github.com/google/go-querystring v1.1.0 // indirect
25+
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
26+
github.com/kr/pretty v0.2.1 // indirect
2327
github.com/nxadm/tail v1.4.5 // indirect
28+
github.com/onsi/ginkgo v1.14.2 // indirect
2429
github.com/shurcooL/graphql v0.0.0-20200928012149-18c5c3165e3a // indirect
25-
golang.org/x/net v0.34.0 // indirect
26-
golang.org/x/sys v0.29.0 // indirect
27-
golang.org/x/text v0.21.0 // indirect
28-
golang.org/x/tools v0.26.0 // indirect
30+
golang.org/x/mod v0.23.0 // indirect
31+
golang.org/x/net v0.35.0 // indirect
32+
golang.org/x/sync v0.11.0 // indirect
33+
golang.org/x/sys v0.30.0 // indirect
34+
golang.org/x/text v0.22.0 // indirect
35+
golang.org/x/tools v0.30.0 // indirect
2936
google.golang.org/appengine v1.6.7 // indirect
30-
google.golang.org/protobuf v1.34.1 // indirect
31-
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
32-
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
37+
google.golang.org/protobuf v1.36.1 // indirect
3338
gopkg.in/yaml.v3 v3.0.1 // indirect
3439
)

0 commit comments

Comments
 (0)