Skip to content

Commit

Permalink
feat: add go 1.22 build (#764)
Browse files Browse the repository at this point in the history
add go 1.22 build support to fix some vulnerabilities.

---------

Signed-off-by: Lize Cai <lize.cai@sap.com>
Co-authored-by: İbrahim Güngör <igungor@gmail.com>
  • Loading branch information
lizzzcai and igungor authored Oct 24, 2024
1 parent 693fc3a commit 8829d3b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ jobs:
strategy:
matrix:
go-version:
- 1.22.x
- 1.21.x
- 1.20.x
- 1.19.x
os:
- macos
- ubuntu
Expand All @@ -32,8 +33,9 @@ jobs:
strategy:
matrix:
go-version:
- 1.22.x
- 1.21.x
- 1.20.x
- 1.19.x
os:
- macos
- ubuntu
Expand Down Expand Up @@ -67,6 +69,8 @@ jobs:
strategy:
matrix:
go-version:
- 1.22.x
- 1.21.x
- 1.20.x
os:
- ubuntu
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.20.x
go-version: 1.22.x
- run: make test_without_race
env:
S5CMD_ACCESS_KEY_ID: ${{ secrets.S5CMD_GCS_ACCESS_KEY_ID }}
Expand All @@ -34,7 +34,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.20'
go-version: '1.22'
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM golang:1.20-alpine as build
FROM golang:1.22-alpine AS build
COPY . /s5cmd/
RUN apk add --no-cache git make && \
cd /s5cmd/ && \
CGO_ENABLED=0 make build

FROM alpine:3.18
FROM alpine:3.20
COPY --from=build /s5cmd/s5cmd .
WORKDIR /aws
ENTRYPOINT ["/s5cmd"]
1 change: 0 additions & 1 deletion e2e/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ func TestRunSpecialCharactersInPrefix(t *testing.T) {
defer file.Remove()

cmd := s5cmd("run", file.Path())
cmd.Timeout = time.Second
result := icmd.RunCmd(cmd)
result.Assert(t, icmd.Success)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/peak/s5cmd/v2

go 1.19
go 1.20

require (
github.com/aws/aws-sdk-go v1.44.298
Expand Down
2 changes: 1 addition & 1 deletion storage/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ func (s *S3) doDelete(ctx context.Context, chunk chunk, resultch chan *Object) {

resultch <- &Object{
URL: url,
Err: fmt.Errorf(aws.StringValue(e.Message)),
Err: fmt.Errorf("%v", aws.StringValue(e.Message)),
}
}
}
Expand Down

0 comments on commit 8829d3b

Please sign in to comment.