Skip to content

Commit

Permalink
go 1.22 compatiable go mod vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaiba committed Jan 9, 2024
1 parent 33782d2 commit 683fb64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ jobs:
- name: Generate go vendor
#for faster builds and private repos, need to run this after pb:compile:v1
run: |
rm -rf vendor
GOWORK=off go mod vendor
task vendor
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand Down Expand Up @@ -128,7 +127,7 @@ jobs:
rm -rf /tmp/kgw
git clone https://github.com/kwilteam/kgw.git /tmp/kgw
cd /tmp/kgw
GOWORK=off go mod vendor
go mod vendor || go work vendor
cd -
- name: Build kgw image
Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ tasks:
deps:
- task: vendor:clean
cmds:
- go mod vendor
- go mod vendor || go work vendor

This comment has been minimized.

Copy link
@jchappelow

jchappelow Jan 9, 2024

Member

Sorry for the back and forth, but it turned out that while this || approach works for local, when we copy the vendor folder into the docker during build, it doesn't like the vendor folder since it's a "workspace" vendor folder.

#446 (comment)

Have to do GOWORK=off go mod vendor to ensure the build done inside Docker succeeds since it's not using workspace mode.

This comment has been minimized.

Copy link
@Yaiba

Yaiba Jan 9, 2024

Author Contributor

ah, sorry didn't pay attention ot that comment.


vendor:clean:
desc: Clean vendor
Expand Down

0 comments on commit 683fb64

Please sign in to comment.