Skip to content

Commit

Permalink
fix synchronization of codegen files (istio#1908)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmuk authored and rshriram committed Nov 29, 2017
1 parent a8cf3ca commit 2df5407
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 21 deletions.
6 changes: 4 additions & 2 deletions bin/bazel_to_go.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def bazel_to_vendor(WKSPC):
print "Vendored", linksrc, '-->', target

protolst = protos(WKSPC, genfiles, genfiles_external)
protolst.append((genfiles + "/external/io_istio_api/fixed_cfg.pb.go", WKSPC + "/mixer/pkg/config/proto/fixed_cfg.pb.go"))
protolst.append((genfiles + "/external/io_istio_api/mixer/v1/config/fixed_cfg.pb.go", WKSPC + "/mixer/pkg/config/proto/fixed_cfg.pb.go"))

# generate manifest of generated files
manifest = sorted([l[0][len(genfiles)+1:] for l in protolst])
Expand Down Expand Up @@ -215,8 +215,10 @@ def should_copy(src, dest):
# there might be diffs for 'source:' lines and others.
has_diff = False
linecount = 0
for l in stdout:
for l in stdout.split('\n'):
linecount += 1
if not l:
continue
if linecount < 3:
# first two lines are headers, skipping
continue
Expand Down
16 changes: 0 additions & 16 deletions bin/generate-protos.sh

This file was deleted.

4 changes: 2 additions & 2 deletions bin/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ BRANCH_NAME=$(git branch | grep '*' | sed 's/* //')
if [ $BRANCH_NAME != '(no branch)' ]; then
cd $ROOT

echo "generating pb.go files..."
bin/generate-protos.sh
echo "updating autogen files..."
bin/bazel_to_go.py

echo "formatting..."
bin/fmt.sh
Expand Down
2 changes: 1 addition & 1 deletion generated_files
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
broker/pkg/model/config/mock_store.go
broker/pkg/platform/kube/crd/types.go
broker/pkg/testing/mock/proto/fake_config.pb.go
external/io_istio_api/fixed_cfg.pb.go
external/io_istio_api/mixer/v1/config/fixed_cfg.pb.go
mixer/adapter/denier/config/config.pb.go
mixer/adapter/inventory.gen.go
mixer/adapter/kubernetes/config/config.pb.go
Expand Down

0 comments on commit 2df5407

Please sign in to comment.