Skip to content

Commit d3967d2

Browse files
authored
update scaffolds for hybrid to use go 1.18 (#180)
Signed-off-by: Bryce Palmer <[email protected]>
1 parent 17304ff commit d3967d2

File tree

6 files changed

+6
-637
lines changed

6 files changed

+6
-637
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Go
1818
uses: actions/setup-go@v3
1919
with:
20-
go-version: ~1.17
20+
go-version: ~1.18
2121
id: go
2222

2323
- name: Check out code into the Go module directory
@@ -56,7 +56,7 @@ jobs:
5656
- name: Set up Go
5757
uses: actions/setup-go@v3
5858
with:
59-
go-version: ~1.17
59+
go-version: ~1.18
6060
id: go
6161

6262
- name: Check out code into the Go module directory

pkg/plugins/hybrid/v1alpha/scaffolds/internal/templates/gomod.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func (f *GoMod) SetTemplateDefaults() error {
4646
const goModTemplate = `
4747
module {{ .Repo }}
4848
49-
go 1.17
49+
go 1.18
5050
5151
require (
5252
sigs.k8s.io/controller-runtime {{ .ControllerRuntimeVersion }}

pkg/plugins/hybrid/v1alpha/scaffolds/internal/templates/makefile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ TMP_DIR=$$(mktemp -d) ;\
176176
cd $$TMP_DIR ;\
177177
go mod init tmp ;\
178178
echo "Downloading $(2)" ;\
179-
GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\
179+
GOBIN=$(PROJECT_DIR)/bin go get $(2) && GOBIN=$(PROJECT_DIR)/bin go install $(2) ;\
180180
rm -rf $$TMP_DIR ;\
181181
}
182182
endef

testdata/hybrid/memcached-operator/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ TMP_DIR=$$(mktemp -d) ;\
103103
cd $$TMP_DIR ;\
104104
go mod init tmp ;\
105105
echo "Downloading $(2)" ;\
106-
GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\
106+
GOBIN=$(PROJECT_DIR)/bin go get $(2) && GOBIN=$(PROJECT_DIR)/bin go install $(2) ;\
107107
rm -rf $$TMP_DIR ;\
108108
}
109109
endef

testdata/hybrid/memcached-operator/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/example/memcached-operator
22

3-
go 1.17
3+
go 1.18
44

55
require (
66
github.com/onsi/ginkgo v1.16.5

0 commit comments

Comments
 (0)