Skip to content

Commit

Permalink
pflag: explicit replace
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Nov 10, 2024
1 parent 7b734b5 commit 930762a
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 15 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/[email protected]
run: go mod edit -replace github.com/spf13/pflag=github.com/carapace-sh/[email protected]

- name: Build
run: go build -v ./...
Expand All @@ -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
Expand Down Expand Up @@ -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/[email protected]
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
if: startsWith(github.ref, 'refs/tags/')
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
cmd/carapace-spec/carapace-spec
dist
docs/book
go.work
go.work.sum
profile.cov
2 changes: 2 additions & 0 deletions cmd/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions cmd/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand All @@ -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=
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/carapace-sh/carapace-spec

go 1.23.0
go 1.23.1

require (
github.com/carapace-sh/carapace v1.4.0
Expand Down
6 changes: 6 additions & 0 deletions go.work
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
go 1.23.1

use (
.
./cmd
)
3 changes: 3 additions & 0 deletions go.work.sum
Original file line number Diff line number Diff line change
@@ -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=

0 comments on commit 930762a

Please sign in to comment.