diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 36be45a..7aac094 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -7,7 +7,7 @@ on: jobs: nonposix: runs-on: ubuntu-latest - container: ghcr.io/carapace-sh/go:1.23.0 + container: ghcr.io/carapace-sh/go:1.23.1 steps: - name: shallow clone uses: actions/checkout@v4 @@ -16,9 +16,7 @@ jobs: run: git config --global --add safe.directory '*' - name: Replace dependency - run: | - go work init . - go work edit -replace github.com/spf13/pflag=github.com/carapace-sh/carapace-pflag@v1.0.0 + run: go mod edit -replace github.com/spf13/pflag=github.com/carapace-sh/carapace-pflag@v1.0.0 - name: Build run: go build -v ./... @@ -28,7 +26,7 @@ jobs: build: runs-on: ubuntu-latest - container: ghcr.io/carapace-sh/go:1.23.0 + container: ghcr.io/carapace-sh/go:1.23.1 steps: - name: shallow clone uses: actions/checkout@v4 @@ -59,11 +57,6 @@ jobs: - name: "staticcheck" run: go install honnef.co/go/tools/cmd/staticcheck@latest && staticcheck ./... - - name: Replace dependency - run: | - go work init . - go work edit -replace github.com/spf13/pflag=github.com/carapace-sh/carapace-pflag@v1.0.0 - - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 if: startsWith(github.ref, 'refs/tags/') diff --git a/.gitignore b/.gitignore index 6457f77..d10497d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ cmd/carapace-spec/carapace-spec dist docs/book -go.work -go.work.sum profile.cov diff --git a/cmd/go.mod b/cmd/go.mod index 8d5cb60..5e98a8d 100644 --- a/cmd/go.mod +++ b/cmd/go.mod @@ -21,3 +21,5 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect ) + +replace github.com/spf13/pflag => github.com/carapace-sh/carapace-pflag v1.0.0 diff --git a/cmd/go.sum b/cmd/go.sum index 5b779d8..636ae21 100644 --- a/cmd/go.sum +++ b/cmd/go.sum @@ -4,6 +4,8 @@ github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMU github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/carapace-sh/carapace v1.4.0 h1:GoCzicKhRgf7/BYZAS/pCBrU3dU4vzISn5XenuOgSh8= github.com/carapace-sh/carapace v1.4.0/go.mod h1:djegtVDi/3duSAqZNU+/nCq7XtDRMRZUb5bW0O/HnEs= +github.com/carapace-sh/carapace-pflag v1.0.0 h1:uJMhl+vwEM/Eb0UdxZUuv4jo4rUAyPijkRGP5gfCuCE= +github.com/carapace-sh/carapace-pflag v1.0.0/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/carapace-sh/carapace-shlex v1.0.1 h1:ww0JCgWpOVuqWG7k3724pJ18Lq8gh5pHQs9j3ojUs1c= github.com/carapace-sh/carapace-shlex v1.0.1/go.mod h1:lJ4ZsdxytE0wHJ8Ta9S7Qq0XpjgjU0mdfCqiI2FHx7M= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -21,8 +23,6 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= diff --git a/go.mod b/go.mod index 2037585..9491253 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/carapace-sh/carapace-spec -go 1.23.0 +go 1.23.1 require ( github.com/carapace-sh/carapace v1.4.0 diff --git a/go.work b/go.work new file mode 100644 index 0000000..1276560 --- /dev/null +++ b/go.work @@ -0,0 +1,6 @@ +go 1.23.1 + +use ( + . + ./cmd +) diff --git a/go.work.sum b/go.work.sum new file mode 100644 index 0000000..65aab3f --- /dev/null +++ b/go.work.sum @@ -0,0 +1,3 @@ +github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=