Skip to content

Commit

Permalink
Disable Go workspaces when running the bingo commands (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
nacx authored Aug 2, 2022
1 parent 95496d7 commit bc83849
Show file tree
Hide file tree
Showing 19 changed files with 905 additions and 26 deletions.
878 changes: 878 additions & 0 deletions .bingo/cue-gen.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/bingo/test.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.17
go 1.18
2 changes: 1 addition & 1 deletion pkg/bingo/test2.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.17
go 1.18
2 changes: 1 addition & 1 deletion pkg/bingo/test3.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.17
go 1.18

require github.com/yolo/best/v100 v100.0.0 // thebest
2 changes: 1 addition & 1 deletion pkg/bingo/test4.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.17
go 1.18

require github.com/yolo/best/v100 v100.0.0
2 changes: 1 addition & 1 deletion pkg/bingo/test5.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.17
go 1.18

require github.com/yolo/not-best v1
2 changes: 1 addition & 1 deletion pkg/bingo/variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ $({{ $p.EnvVarName }}):{{- range $p.Versions }} $(BINGO_DIR)/{{ .ModFile }}{{- e
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
{{- range $p.Versions }}
@echo "(re)installing $(GOBIN)/{{ $p.Name }}-{{ .Version }}"
@cd $(BINGO_DIR) && {{ range $p.BuildEnvVars }}{{ . }} {{ end }}$(GO) build {{ range $p.BuildFlags }}{{ . }} {{ end }}-mod=mod -modfile={{ .ModFile }} -o=$(GOBIN)/{{ $p.Name }}-{{ .Version }} "{{ $p.PackagePath }}"
@cd $(BINGO_DIR) && GOWORK=off {{ range $p.BuildEnvVars }}{{ . }} {{ end }}$(GO) build {{ range $p.BuildFlags }}{{ . }} {{ end }}-mod=mod -modfile={{ .ModFile }} -o=$(GOBIN)/{{ $p.Name }}-{{ .Version }} "{{ $p.PackagePath }}"
{{- end }}
{{ end}}
`,
Expand Down
1 change: 1 addition & 0 deletions pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func (r *Runner) exec(ctx context.Context, output io.Writer, e envars.EnvSlice,
// TODO(bwplotka): Might be surprising, let's return err when this env variable is altered.
e = envars.MergeEnvSlices(os.Environ(), e...)
e.Set("GO111MODULE=on")
e.Set("GOWORK=off")
cmd.Env = e
cmd.Stdout = output
cmd.Stderr = output
Expand Down
20 changes: 10 additions & 10 deletions testdata/testproject_with_bingo_v0_6/.bingo/Variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,47 +21,47 @@ BUILDABLE := $(GOBIN)/buildable-v0.0.0-20210109094001-375d0606849d
$(BUILDABLE): $(BINGO_DIR)/buildable.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/buildable-v0.0.0-20210109094001-375d0606849d"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=buildable.mod -o=$(GOBIN)/buildable-v0.0.0-20210109094001-375d0606849d "github.com/bwplotka/bingo/testdata/module/buildable"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=buildable.mod -o=$(GOBIN)/buildable-v0.0.0-20210109094001-375d0606849d "github.com/bwplotka/bingo/testdata/module/buildable"

BUILDABLE2 := $(GOBIN)/buildable2-v0.0.0-20210109093942-2e6391144e85
$(BUILDABLE2): $(BINGO_DIR)/buildable2.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/buildable2-v0.0.0-20210109093942-2e6391144e85"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=buildable2.mod -o=$(GOBIN)/buildable2-v0.0.0-20210109093942-2e6391144e85 "github.com/bwplotka/bingo/testdata/module/buildable2"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=buildable2.mod -o=$(GOBIN)/buildable2-v0.0.0-20210109093942-2e6391144e85 "github.com/bwplotka/bingo/testdata/module/buildable2"

BUILDABLE_OLD := $(GOBIN)/buildable_old-v0.0.0-20210109093942-2e6391144e85
$(BUILDABLE_OLD): $(BINGO_DIR)/buildable_old.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/buildable_old-v0.0.0-20210109093942-2e6391144e85"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=buildable_old.mod -o=$(GOBIN)/buildable_old-v0.0.0-20210109093942-2e6391144e85 "github.com/bwplotka/bingo/testdata/module/buildable"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=buildable_old.mod -o=$(GOBIN)/buildable_old-v0.0.0-20210109093942-2e6391144e85 "github.com/bwplotka/bingo/testdata/module/buildable"

F2_ARRAY := $(GOBIN)/f2-v1.5.0 $(GOBIN)/f2-v1.1.0 $(GOBIN)/f2-v1.2.0 $(GOBIN)/f2-v1.0.0
$(F2_ARRAY): $(BINGO_DIR)/f2.mod $(BINGO_DIR)/f2.1.mod $(BINGO_DIR)/f2.2.mod $(BINGO_DIR)/f2.3.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/f2-v1.5.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=f2.mod -o=$(GOBIN)/f2-v1.5.0 "github.com/fatih/faillint"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=f2.mod -o=$(GOBIN)/f2-v1.5.0 "github.com/fatih/faillint"
@echo "(re)installing $(GOBIN)/f2-v1.1.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=f2.1.mod -o=$(GOBIN)/f2-v1.1.0 "github.com/fatih/faillint"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=f2.1.mod -o=$(GOBIN)/f2-v1.1.0 "github.com/fatih/faillint"
@echo "(re)installing $(GOBIN)/f2-v1.2.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=f2.2.mod -o=$(GOBIN)/f2-v1.2.0 "github.com/fatih/faillint"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=f2.2.mod -o=$(GOBIN)/f2-v1.2.0 "github.com/fatih/faillint"
@echo "(re)installing $(GOBIN)/f2-v1.0.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=f2.3.mod -o=$(GOBIN)/f2-v1.0.0 "github.com/fatih/faillint"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=f2.3.mod -o=$(GOBIN)/f2-v1.0.0 "github.com/fatih/faillint"

FAILLINT := $(GOBIN)/faillint-v1.3.0
$(FAILLINT): $(BINGO_DIR)/faillint.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/faillint-v1.3.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=faillint.mod -o=$(GOBIN)/faillint-v1.3.0 "github.com/fatih/faillint"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=faillint.mod -o=$(GOBIN)/faillint-v1.3.0 "github.com/fatih/faillint"

GO_BINDATA := $(GOBIN)/go-bindata-v3.1.1+incompatible
$(GO_BINDATA): $(BINGO_DIR)/go-bindata.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/go-bindata-v3.1.1+incompatible"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=go-bindata.mod -o=$(GOBIN)/go-bindata-v3.1.1+incompatible "github.com/go-bindata/go-bindata/go-bindata"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=go-bindata.mod -o=$(GOBIN)/go-bindata-v3.1.1+incompatible "github.com/go-bindata/go-bindata/go-bindata"

WR_BUILDABLE := $(GOBIN)/wr_buildable-v0.0.0-20210109165512-ccbd4039b94a
$(WR_BUILDABLE): $(BINGO_DIR)/wr_buildable.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/wr_buildable-v0.0.0-20210109165512-ccbd4039b94a"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=wr_buildable.mod -o=$(GOBIN)/wr_buildable-v0.0.0-20210109165512-ccbd4039b94a "github.com/bwplotka/bingo/testdata/module_with_replace/buildable"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=wr_buildable.mod -o=$(GOBIN)/wr_buildable-v0.0.0-20210109165512-ccbd4039b94a "github.com/bwplotka/bingo/testdata/module_with_replace/buildable"

2 changes: 1 addition & 1 deletion testdata/testproject_with_bingo_v0_6/.bingo/buildable.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.17
go 1.18

require github.com/bwplotka/bingo/testdata/module v0.0.0-20210109094001-375d0606849d // buildable
2 changes: 1 addition & 1 deletion testdata/testproject_with_bingo_v0_6/.bingo/buildable2.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.17
go 1.18

require github.com/bwplotka/bingo/testdata/module v0.0.0-20210109093942-2e6391144e85 // buildable2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.17
go 1.18

require github.com/bwplotka/bingo/testdata/module v0.0.0-20210109093942-2e6391144e85 // buildable
2 changes: 1 addition & 1 deletion testdata/testproject_with_bingo_v0_6/.bingo/f2.1.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.17
go 1.18

require github.com/fatih/faillint v1.1.0
2 changes: 1 addition & 1 deletion testdata/testproject_with_bingo_v0_6/.bingo/f2.2.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.17
go 1.18

require github.com/fatih/faillint v1.2.0
2 changes: 1 addition & 1 deletion testdata/testproject_with_bingo_v0_6/.bingo/f2.3.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.17
go 1.18

require github.com/fatih/faillint v1.0.0
2 changes: 1 addition & 1 deletion testdata/testproject_with_bingo_v0_6/.bingo/f2.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.17
go 1.18

require github.com/fatih/faillint v1.5.0
2 changes: 1 addition & 1 deletion testdata/testproject_with_bingo_v0_6/.bingo/faillint.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.17
go 1.18

require github.com/fatih/faillint v1.3.0
2 changes: 1 addition & 1 deletion testdata/testproject_with_bingo_v0_6/.bingo/go-bindata.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.17
go 1.18

require github.com/go-bindata/go-bindata v3.1.1+incompatible // go-bindata
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.17
go 1.18

replace github.com/bwplotka/bingo => github.com/pkg/errors v0.9.1

Expand Down

0 comments on commit bc83849

Please sign in to comment.