Skip to content

Commit

Permalink
Update common files. (istio#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
geeknoid authored and istio-testing committed Oct 11, 2019
1 parent de0ca8d commit e27c7dd
Show file tree
Hide file tree
Showing 6 changed files with 1,926 additions and 26 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ tools/vagrant/.vagrant/
cluster.env
kubedns
# codegen stuff
bin/protoc-gen-gogoslick*
bin/protoc-min-version*
bin/protoc-gen-docs*
*.orig
.mesh-cli.log
#mandiff output
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ ifeq ($(BUILD_WITH_CONTAINER),1)
export TARGET_OUT = /work/out/$(TARGET_ARCH)_$(TARGET_OS)
CONTAINER_CLI ?= docker
DOCKER_SOCKET_MOUNT ?= -v /var/run/docker.sock:/var/run/docker.sock
IMG ?= gcr.io/istio-testing/build-tools:2019-10-09T18-20-54
IMG ?= gcr.io/istio-testing/build-tools:2019-10-11T13-37-52
UID = $(shell id -u)
PWD = $(shell pwd)

Expand Down
39 changes: 18 additions & 21 deletions Makefile.core.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,40 +35,36 @@ test_with_coverage:
@curl -s https://codecov.io/bash | bash -s -- -c -F aFlag -f coverage.txt

mandiff: update-charts
@PATH=${PATH}:${GOPATH}/bin scripts/run_mandiff.sh
@scripts/run_mandiff.sh

fmt: format-go
go mod tidy
fmt: format-go tidy

update-charts: installer.sha
@scripts/run_update_charts.sh `cat installer.sha`
gen: generate-values generate-types generate-vfs

clean-charts:
@rm -fr data/charts
# make target dependencies
vfsgen: data/ update-charts
go generate ./...
gen-check: clean gen check-clean-repo tidy

clean-vfs:
@rm -fr pkg/vfs/assets.gen.go

gen: generate-values generate-types vfsgen
generate: gen
clean: clean-values clean-types clean-vfs clean-charts

tidy:
@go mod tidy

gen-check: clean gen tidy check-clean-repo
update-charts: installer.sha
@scripts/run_update_charts.sh `cat installer.sha`

clean: clean-values clean-types clean-vfs clean-charts
clean-charts:
@rm -fr data/charts

default: mesh
generate-vfs: update-charts
@go generate ./...

mesh: vfsgen
clean-vfs:
@rm -fr pkg/vfs/assets.gen.go

mesh: generate-vfs
go build -o $(GOBIN)/mesh ./cmd/mesh.go
GOARCH=$(TARGET_ARCH) GOOS=$(TARGET_OS) go build -o $(TARGET_OUT)/mesh ./cmd/mesh.go

controller: vfsgen
controller: generate-vfs
go build -o $(GOBIN)/istio-operator ./cmd/manager
GOARCH=$(TARGET_ARCH) GOOS=$(TARGET_OS) go build -o $(TARGET_OUT)/istio-operator ./cmd/manager

Expand Down Expand Up @@ -108,6 +104,7 @@ protoc_gen_docs_plugin := --docs_out=warnings=true,mode=html_fragment_with_front
protoc_gen_k8s_support_plugins := --jsonshim_out=$(gogo_mapping):$(out_path) --deepcopy_out=$(gogo_mapping):$(out_path)

########################

types_v1alpha2_path := pkg/apis/istio/v1alpha2
types_v1alpha2_protos := $(wildcard $(types_v1alpha2_path)/*.proto)
types_v1alpha2_pb_gos := $(types_v1alpha2_protos:.proto=.pb.go)
Expand Down Expand Up @@ -139,7 +136,7 @@ $(values_v1alpha1_pb_gos) $(values_v1alpha1_pb_docs) $(values_v1alpha1_pb_python
@$(protoc) $(go_plugin) $(protoc_gen_k8s_support_plugins) $(protoc_gen_docs_plugin)$(values_v1alpha1_path) $(protoc_gen_python_plugin) $^
@cp -r ${TMPDIR}/pkg/* pkg/
@sed -i 's|github.com/gogo/protobuf/protobuf/google/protobuf|github.com/gogo/protobuf/types|g' $(values_v1alpha1_path)/values_types.pb.go
@GOARCH=amd64 GOOS=linux go run $(repo_dir)/pkg/apis/istio/fixup_structs/main.go -f $(values_v1alpha1_path)/values_types.pb.go
@go run $(repo_dir)/pkg/apis/istio/fixup_structs/main.go -f $(values_v1alpha1_path)/values_types.pb.go

generate-values: $(values_v1alpha1_pb_gos) $(values_v1alpha1_pb_docs) $(values_v1alpha1_pb_pythons)

Expand Down
2 changes: 1 addition & 1 deletion common/.commonfiles.sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
23964a61fe765efb932204b72458f2915e1e17b7
b7abe85fe19c2bd8f66c4903a2624a60b79dac96
Loading

0 comments on commit e27c7dd

Please sign in to comment.