File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ pushd ${ROOT_DIR}/discovery-artifact-manager
4343for DISCOVERY in ` ls discoveries/${SERVICE} .* .json`
4444do
4545 VERSION=$( basename ${DISCOVERY} | sed ' s/\.json//' | cut -d. -f2-)
46- OUTPUT_DIR=${ROOT_DIR} /google-api-java-client-services/clients/google-api-services-${SERVICE} /${VERSION} /${VARIANT}
46+ TARGET_DIR=${ROOT_DIR} /google-api-java-client-services/clients/google-api-services-${SERVICE} /${VERSION} /${VARIANT}
47+ OUTPUT_DIR=$( mktemp -d)
4748 echo ${DISCOVERY}
4849 echo ${VERSION}
4950 echo ${OUTPUT_DIR}
5556 --language_variant=${VARIANT} \
5657 --package_path=api/services
5758
59+ if [ $( find " ${OUTPUT_DIR} " -mindepth 1 | wc -l) == ' 0' ]; then
60+ echo ' the generation produced no files'
61+ exit 1
62+ fi
63+
64+ # transfer generated source into the wiped-out service's source folder
65+ rm -rdf ${TARGET_DIR} /*
66+ cp -r ${OUTPUT_DIR} /* " ${TARGET_DIR} "
67+
5868 # Copy the latest variant's README to the main service location
5969 # Generation of libraries with older variants should not update the root README
6070 cp ${ROOT_DIR} /google-api-java-client-services/clients/google-api-services-${SERVICE} /${VERSION} /${LATEST_VARIANT} /README.md ${ROOT_DIR} /google-api-java-client-services/clients/google-api-services-${SERVICE} /${VERSION} /README.md
6171done
72+
You can’t perform that action at this time.
0 commit comments