Skip to content

Commit

Permalink
gapic: add release-level flag to docker entrypoint (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
noahdietz authored Oct 3, 2019
1 parent 53cc3d3 commit a184331
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
GO_GAPIC_PACKAGE=
GAPIC_SERVICE_CONFIG=
GRPC_SERVICE_CONFIG=
RELEASE_LEVEL=

# enable extended globbing for flag pattern matching
shopt -s extglob
Expand All @@ -28,6 +29,7 @@ while true; do
--go-gapic-package ) GO_GAPIC_PACKAGE="go-gapic-package=$2"; shift 2 ;;
--gapic-service-config ) GAPIC_SERVICE_CONFIG="gapic-service-config=/conf/$2"; shift 2;;
--grpc-service-config ) GRPC_SERVICE_CONFIG="grpc-service-config=/conf/$2"; shift 2;;
--release-level ) RELEASE_LEVEL="release-level=$2"; shift 2 ;;
--go-gapic* ) echo "Skipping unrecognized go-gapic flag: $1" >&2; shift ;;
--* | +([[:word:][:punct:]]) ) shift ;;
* ) break ;;
Expand All @@ -43,6 +45,7 @@ protoc --proto_path=/protos/ --proto_path=/in/ \
--gapic-validator_out=. \
--go_gapic_out=/out/ \
--go_gapic_opt="$GO_GAPIC_PACKAGE" \
--go_gapic_opt="$RELEASE_LEVEL" \
--go_gapic_opt="$GAPIC_SERVICE_CONFIG" \
--go_gapic_opt="$GRPC_SERVICE_CONFIG" \
`find /in/ -name *.proto`

0 comments on commit a184331

Please sign in to comment.