diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 42bec33d..a559299f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ jobs: test: strategy: matrix: - go-version: [1.20.x, 1.21.x] + go-version: [1.21.x, 1.22.x] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: @@ -28,9 +28,9 @@ jobs: # Static checks from this point forward. Only run on one Go version and on # Linux, since it's the fastest platform, and the tools behave the same. - - if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.21.x' + - if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.22.x' run: diff <(echo -n) <(gofmt -s -d .) - - if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.21.x' + - if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.22.x' run: go vet ./... test-linux-alpine: @@ -38,7 +38,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Test as root, without cgo, and with busybox - run: docker run -v="$PWD:/pwd" -w=/pwd -e=CGO_ENABLED=0 golang:1.21.0-alpine go test ./... + run: docker run -v="$PWD:/pwd" -w=/pwd -e=CGO_ENABLED=0 golang:1.22.0-alpine go test ./... docker: name: Build and test Docker images diff --git a/README.md b/README.md index 6c6c21d6..e5a5ccb4 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Go Reference](https://pkg.go.dev/badge/mvdan.cc/sh/v3.svg)](https://pkg.go.dev/mvdan.cc/sh/v3) A shell parser, formatter, and interpreter. Supports [POSIX Shell], [Bash], and -[mksh]. Requires Go 1.20 or later. +[mksh]. Requires Go 1.21 or later. ### Quick start diff --git a/cmd/shfmt/Dockerfile b/cmd/shfmt/Dockerfile index 2a6e06ab..bf5084dc 100644 --- a/cmd/shfmt/Dockerfile +++ b/cmd/shfmt/Dockerfile @@ -1,11 +1,11 @@ -FROM golang:1.21.0-alpine AS build +FROM golang:1.22.0-alpine AS build WORKDIR /src RUN apk add --no-cache git COPY . . RUN CGO_ENABLED=0 go build -ldflags "-w -s -extldflags '-static' -X main.version=$(git describe --always --dirty --tags)" ./cmd/shfmt -FROM alpine:3.18.2 AS alpine +FROM alpine:3.19.1 AS alpine COPY --from=build /src/shfmt /bin/shfmt COPY "./cmd/shfmt/docker-entrypoint.sh" "/init" ENTRYPOINT ["/init"] diff --git a/go.mod b/go.mod index ad0c4231..a9f4322b 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module mvdan.cc/sh/v3 -go 1.20 +go 1.21 require ( github.com/creack/pty v1.1.21