mirror of https://github.com/grpc/grpc-java.git
buildscripts: Clean up dummy default version check cmd
These statements can be simplified to be more readable.
This commit is contained in:
parent
9aa53b589d
commit
19f4491ce9
|
|
@ -26,16 +26,12 @@ cd ./github/grpc-java
|
|||
## Deploy the dummy 'default' version of the service
|
||||
##
|
||||
GRADLE_FLAGS="--stacktrace -DgaeStopPreviousVersion=false -PskipCodegen=true"
|
||||
DUMMY_EXISTS_CMD="gcloud app versions describe $DUMMY_DEFAULT_VERSION --service=$KOKORO_GAE_SERVICE"
|
||||
DEPLOY_DUMMY_CMD="./gradlew $GRADLE_FLAGS -DgaeDeployVersion=$DUMMY_DEFAULT_VERSION -DgaePromote=true :grpc-gae-interop-testing-jdk8:appengineDeploy"
|
||||
|
||||
# Deploy the dummy 'default' version. We only require that it exists when cleanup() is called.
|
||||
# It ok if we race with another run and fail here, because the end result is idempotent.
|
||||
set +e
|
||||
$DUMMY_EXISTS_CMD
|
||||
EXIST=$?
|
||||
if [[ $EXIST != 0 ]]; then
|
||||
$DEPLOY_DUMMY_CMD
|
||||
if ! gcloud app versions describe "$DUMMY_DEFAULT_VERSION" --service="$KOKORO_GAE_SERVICE"; then
|
||||
./gradlew $GRADLE_FLAGS -DgaeDeployVersion="$DUMMY_DEFAULT_VERSION" -DgaePromote=true :grpc-gae-interop-testing-jdk8:appengineDeploy
|
||||
else
|
||||
echo "default version already exists: $DUMMY_DEFAULT_VERSION"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue