File tree 3 files changed +13
-6
lines changed
3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -254,6 +254,10 @@ jobs:
254
254
name : Prepare
255
255
run : |
256
256
echo "VAGRANT_FILE=hack/Vagrantfile.${{ matrix.os }}" >> $GITHUB_ENV
257
+
258
+ # Sets semver Go version to be able to download tarball during vagrant setup
259
+ goVersion=$(curl --silent "https://go.dev/dl/?mode=json&include=all" | jq -r '.[].files[].version' | uniq | sed -e 's/go//' | sort -V | grep $GO_VERSION | tail -1)
260
+ echo "GO_VERSION=$goVersion" >> $GITHUB_ENV
257
261
-
258
262
name : Checkout
259
263
uses : actions/checkout@v4
Original file line number Diff line number Diff line change @@ -9,10 +9,13 @@ Vagrant.configure("2") do |config|
9
9
10
10
config . vm . provision "init" , type : "shell" , run : "once" do |sh |
11
11
sh . inline = <<~SHELL
12
+ set -x
12
13
pkg bootstrap
13
- pkg install -y go123 git
14
- ln -s /usr/local/bin/go123 /usr/local/bin/go
15
- go install gotest.tools/gotestsum@#{ ENV [ 'GOTESTSUM_VERSION' ] }
14
+ pkg install -y git
15
+
16
+ fetch https://go.dev/dl/go#{ ENV [ 'GO_VERSION' ] } .freebsd-amd64.tar.gz
17
+ tar -C /usr/local -xzf go#{ ENV [ 'GO_VERSION' ] } .freebsd-amd64.tar.gz
18
+ ln -s /usr/local/go/bin/go /usr/local/bin/go
16
19
SHELL
17
20
end
18
21
end
Original file line number Diff line number Diff line change @@ -10,12 +10,12 @@ Vagrant.configure("2") do |config|
10
10
11
11
config . vm . provision "init" , type : "shell" , run : "once" do |sh |
12
12
sh . inline = <<~SHELL
13
+ set -x
13
14
pkg_add -x git
14
15
15
- ftp https://go.dev/dl/go1.23.3 .openbsd-amd64.tar.gz
16
- tar -C /usr/local -xzf go1.23.3 .openbsd-amd64.tar.gz
16
+ ftp https://go.dev/dl/go #{ ENV [ 'GO_VERSION' ] } .openbsd-amd64.tar.gz
17
+ tar -C /usr/local -xzf go #{ ENV [ 'GO_VERSION' ] } .openbsd-amd64.tar.gz
17
18
ln -s /usr/local/go/bin/go /usr/local/bin/go
18
- go install gotest.tools/gotestsum@#{ ENV [ 'GOTESTSUM_VERSION' ] }
19
19
SHELL
20
20
end
21
21
end
You can’t perform that action at this time.
0 commit comments