github.com/solo-io/cue@v0.4.7/encoding/protobuf/cue/Makefile (about)

     1  all: install-go-tools build format
     2  
     3  ROOTDIR := $(shell pwd)
     4  OUTPUTDIR = $(ROOTDIR)/_output
     5  DEPSGOBIN = $(OUTPUTDIR)/.bin
     6  
     7  .PHONY: mod-download
     8  mod-download:
     9  	go mod download
    10  
    11  .PHONY: install-go-tools
    12  install-go-tools: mod-download
    13  	mkdir -p $(DEPSGOBIN)
    14  	GOBIN=$(DEPSGOBIN) go install github.com/golang/protobuf/protoc-gen-go
    15  
    16  build:
    17  	mkdir -p $(OUTPUTDIR)
    18  	PATH=$(DEPSGOBIN):$(PATH) protoc -I=$(ROOTDIR) -I=$(ROOTDIR)/imports/ --go_out=$(OUTPUTDIR) cue.proto
    19  	cp $(OUTPUTDIR)/github.com/solo-io/cue/encoding/protobuf/cue/cue.pb.go $(ROOTDIR)
    20  	rm -rf $(OUTPUTDIR)
    21  
    22  format:
    23  	go mod tidy
    24  	PATH=$(DEPSGOBIN):$(PATH) gofmt -w .
    25  	PATH=$(DEPSGOBIN):$(PATH) goimports -w .