Skip to content

Commit

Permalink
Removing go-bindata for embed (#4215)
Browse files Browse the repository at this point in the history
Co-authored-by: John Doak <[email protected]>
  • Loading branch information
element-of-surprise and John Doak authored Apr 25, 2024
1 parent 6de1699 commit aca4e0b
Show file tree
Hide file tree
Showing 7 changed files with 483 additions and 10,335 deletions.
5 changes: 0 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,8 @@ compile-proto-files:
.PHONY: generate
generate: bootstrap
@echo $(GOFLAGS)
@echo "$$(go-bindata --version)"
./hack/tools/bin/cue export ./schemas/manifest.cue > ./parts/linux/cloud-init/artifacts/manifest.json
@echo "#EOF" >> ./parts/linux/cloud-init/artifacts/manifest.json
(pushd parts && \
../hack/tools/bin/go-bindata --nometadata --nocompress -pkg templates -ignore "[a-zA-Z0-9-_].tests.ps1" -o ../pkg/templates/templates_generated.go ./... && \
popd \
)
GENERATE_TEST_DATA="true" go test ./pkg/agent...
@echo "running validate-shell to make sure generated cse scripts are correct"
@$(MAKE) validate-shell
Expand Down
5 changes: 1 addition & 4 deletions hack/tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ LOCALBIN = $(shell pwd)/bin
all: install

.PHONY: install
install: $(LOCALBIN)/go-bindata $(LOCALBIN)/gox $(LOCALBIN)/ginkgo $(LOCALBIN)/golangci-lint $(LOCALBIN)/cue $(LOCALBIN)/buf
install: $(LOCALBIN)/gox $(LOCALBIN)/ginkgo $(LOCALBIN)/golangci-lint $(LOCALBIN)/cue $(LOCALBIN)/buf
@echo > /dev/null

$(LOCALBIN)/go-bindata:
GOBIN=$(LOCALBIN) $(GO) install github.com/go-bindata/go-bindata/[email protected]

$(LOCALBIN)/gox:
GOBIN=$(LOCALBIN) $(GO) install github.com/mitchellh/gox/[email protected]

Expand Down
9 changes: 9 additions & 0 deletions parts/parts.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Package parts provides the the embedded templates used in Linux and Windows systems.
package parts

import "embed"

// Templates is an embedded filesystem that contains the templates used in Linux and Windows systems.
//
//go:embed *
var Templates embed.FS
Loading

0 comments on commit aca4e0b

Please sign in to comment.