Skip to content

Commit

Permalink
feat: adapt to new library_list.txt (#1424)
Browse files Browse the repository at this point in the history
* feat: adapt to new library_list.txt

* passes googleapis commitish to `generate-one.sh`
* has optional function for local development

* chore: optional arg to do maven install in root folder

* chore: remove unnecessary dev env code
  • Loading branch information
diegomarquezp committed Jan 20, 2023
1 parent 7f47abc commit 8e25781
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions spring-cloud-generator/generate-all.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#!/bin/bash

WORKING_DIR=`pwd`

while getopts d: flag
do
case "${flag}" in
d) dev_env=1;;
esac
done

cd ../
# Compute the project version.
PROJECT_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
Expand All @@ -12,19 +18,17 @@ cd spring-cloud-generator

bash download-repos.sh
libraries=$(cat $WORKING_DIR/library_list.txt | tail -n+2)
while IFS=, read -r library_name googleapis_location coordinates_version; do
while IFS=, read -r library_name googleapis_location coordinates_version googleapis_commitish; do
echo "processing library $library_name"
group_id=$(echo $coordinates_version | cut -f1 -d:)
artifact_id=$(echo $coordinates_version | cut -f2 -d:)
bash $WORKING_DIR/generate-one.sh -c $library_name -i $artifact_id -g $group_id -p $PROJECT_VERSION -f $googleapis_location
bash $WORKING_DIR/generate-one.sh -c $library_name -i $artifact_id -g $group_id -p $PROJECT_VERSION -f $googleapis_location -x $googleapis_commitish
done <<< $libraries


echo "run google-java-format on generated code"
cd ../spring-cloud-previews
./../mvnw com.coveo:fmt-maven-plugin:format -Dfmt.skip=false

cd ../spring-cloud-generator
rm -rf googleapis
rm -rf gapic-generator-java

0 comments on commit 8e25781

Please sign in to comment.