Skip to content

Commit

Permalink
Fix Go 1.22 build, adapt to modules in KST repo
Browse files Browse the repository at this point in the history
  • Loading branch information
generalmimon committed Jul 12, 2024
1 parent 6e31384 commit 8c8f58f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/go/1.21-linux-x86_64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN ./prepare-alpine-init
# Ruby is required for test infrastructure (aggregators, test result converters) to work
RUN ./prepare-alpine-ruby

# Required to download go-junit-report release in ./prepare-go-deps
# Required to download go-junit-report release in ./prepare
RUN apk add curl

# Required for `go get` to work
Expand All @@ -25,3 +25,6 @@ RUN ./prepare
# go version go1.21.3 linux/amd64

RUN ./validate '^go version go1\.21\.'

# Prevent Go from accessing the network (see https://go.dev/ref/mod#resolve-pkg-mod)
ENV GOPROXY=off
5 changes: 4 additions & 1 deletion src/go/1.22-linux-x86_64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN ./prepare-alpine-init
# Ruby is required for test infrastructure (aggregators, test result converters) to work
RUN ./prepare-alpine-ruby

# Required to download go-junit-report release in ./prepare-go-deps
# Required to download go-junit-report release in ./prepare
RUN apk add curl

# Required for `go get` to work
Expand All @@ -25,3 +25,6 @@ RUN ./prepare
# go version go1.22.0 linux/amd64

RUN ./validate '^go version go1\.22\.'

# Prevent Go from accessing the network (see https://go.dev/ref/mod#resolve-pkg-mod)
ENV GOPROXY=off
14 changes: 11 additions & 3 deletions src/go/_common/prepare
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
#!/bin/sh -ef

GO111MODULE=off go get -v github.com/kaitai-io/kaitai_struct_go_runtime/kaitai
GO111MODULE=off go get -v github.com/stretchr/testify/assert
GO111MODULE=off go get -v golang.org/x/text
(
git clone --depth 1 https://github.com/kaitai-io/kaitai_struct_go_runtime /download/runtime/go
git -C /download/runtime/go rev-parse HEAD
git clone --depth 1 https://github.com/kaitai-io/kaitai_struct_tests /download/tests
cd /download/tests
git rev-parse HEAD
./prepare-go
cd spec/go
go mod download
)
rm -rf /download

# Install https://github.com/jstemmer/go-junit-report
curl -fsSL https://github.com/jstemmer/go-junit-report/releases/download/v2.1.0/go-junit-report-v2.1.0-linux-amd64.tar.gz | tar xzvf -
Expand Down

0 comments on commit 8c8f58f

Please sign in to comment.