Skip to content

Commit

Permalink
chore: Fix update_versions.sh to include beyondcorp
Browse files Browse the repository at this point in the history
  • Loading branch information
lqiu96 committed Oct 15, 2022
1 parent e719105 commit 323fe5f
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 22 deletions.
10 changes: 5 additions & 5 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
"java-automl": "2.3.18",
"java-bare-metal-solution": "0.3.8",
"java-batch": "0.3.2",
"java-beyondcorp-appconnections": "0.0.0",
"java-beyondcorp-appconnectors": "0.0.0",
"java-beyondcorp-appgateways": "0.0.0",
"java-beyondcorp-clientconnectorservices": "0.1.2",
"java-beyondcorp-clientgateways": "0.0.0",
"java-beyondcorp-appconnections": "0.1.0",
"java-beyondcorp-appconnectors": "0.1.0",
"java-beyondcorp-appgateways": "0.1.0",
"java-beyondcorp-clientconnectorservices": "0.1.3",
"java-beyondcorp-clientgateways": "0.1.0",
"java-bigqueryconnection": "2.5.6",
"java-bigquery-data-exchange": "0.4.0",
"java-bigquerydatapolicy": "0.0.0",
Expand Down
7 changes: 5 additions & 2 deletions generation/update_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ count=0
missing_artifacts=()

for path in $(find . -mindepth 2 -maxdepth 2 -name pom.xml | sort | xargs dirname); do
# As of 9/21/22: BeyondCorp repos do not have artifacts released to maven central
if [[ "${path}" =~ gapic-libraries-bom ]] || [[ "${path}" =~ .*samples.* ]] || [[ "${path}" =~ .*beyondcorp.* ]]; then
if [[ "${path}" =~ gapic-libraries-bom ]] || [[ "${path}" =~ .*samples.* ]]; then
continue
fi

Expand Down Expand Up @@ -95,6 +94,8 @@ for path in $(find . -mindepth 2 -maxdepth 2 -name pom.xml | sort | xargs dirnam
maven_latest_version=$(echo "${maven_metadata_version}" | cut -d "-" -f1)
maven_latest_trailing=$(echo "${maven_metadata_version}" | cut -s -d "-" -f2-)

echo "${artifactId} has latest version: ${maven_latest_version}"

major_version=$(echo "${maven_latest_version}" | cut -d "." -f1)
minor_version=$(echo "${maven_latest_version}" | cut -d "." -f2)
patch_version=$(echo "${maven_latest_version}" | cut -d "." -f3)
Expand All @@ -110,6 +111,8 @@ for path in $(find . -mindepth 2 -maxdepth 2 -name pom.xml | sort | xargs dirnam
new_version="${artifactId}:${maven_metadata_version}:${maven_metadata_version}"
fi

echo "Updating ${artifactId} from version ${maven_metadata_version} to ${new_version}"

sed -i.bak "s/${line}/${new_version}/g" "${path}/versions.txt" && rm "${path}/versions.txt.bak"
else
missing_artifacts+=("${artifactId}")
Expand Down
6 changes: 3 additions & 3 deletions java-beyondcorp-appconnections/versions.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Format:
# module:released-version:current-version

google-cloud-beyondcorp-appconnections:0.0.0:0.1.0-SNAPSHOT
proto-google-cloud-beyondcorp-appconnections-v1:0.0.0:0.1.0-SNAPSHOT
grpc-google-cloud-beyondcorp-appconnections-v1:0.0.0:0.1.0-SNAPSHOT
google-cloud-beyondcorp-appconnections:0.1.0:0.1.1-SNAPSHOT
proto-google-cloud-beyondcorp-appconnections-v1:0.1.0:0.1.1-SNAPSHOT
grpc-google-cloud-beyondcorp-appconnections-v1:0.1.0:0.1.1-SNAPSHOT
6 changes: 3 additions & 3 deletions java-beyondcorp-appconnectors/versions.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Format:
# module:released-version:current-version

google-cloud-beyondcorp-appconnectors:0.0.0:0.1.0-SNAPSHOT
proto-google-cloud-beyondcorp-appconnectors-v1:0.0.0:0.1.0-SNAPSHOT
grpc-google-cloud-beyondcorp-appconnectors-v1:0.0.0:0.1.0-SNAPSHOT
google-cloud-beyondcorp-appconnectors:0.1.0:0.1.1-SNAPSHOT
proto-google-cloud-beyondcorp-appconnectors-v1:0.1.0:0.1.1-SNAPSHOT
grpc-google-cloud-beyondcorp-appconnectors-v1:0.1.0:0.1.1-SNAPSHOT
6 changes: 3 additions & 3 deletions java-beyondcorp-appgateways/versions.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Format:
# module:released-version:current-version

google-cloud-beyondcorp-appgateways:0.0.0:0.1.0-SNAPSHOT
proto-google-cloud-beyondcorp-appgateways-v1:0.0.0:0.1.0-SNAPSHOT
grpc-google-cloud-beyondcorp-appgateways-v1:0.0.0:0.1.0-SNAPSHOT
google-cloud-beyondcorp-appgateways:0.1.0:0.1.1-SNAPSHOT
proto-google-cloud-beyondcorp-appgateways-v1:0.1.0:0.1.1-SNAPSHOT
grpc-google-cloud-beyondcorp-appgateways-v1:0.1.0:0.1.1-SNAPSHOT
6 changes: 3 additions & 3 deletions java-beyondcorp-clientconnectorservices/versions.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Format:
# module:released-version:current-version

google-cloud-beyondcorp-clientconnectorservices:0.1.2:0.1.3-SNAPSHOT
proto-google-cloud-beyondcorp-clientconnectorservices-v1:0.1.2:0.1.3-SNAPSHOT
grpc-google-cloud-beyondcorp-clientconnectorservices-v1:0.1.2:0.1.3-SNAPSHOT
google-cloud-beyondcorp-clientconnectorservices:0.1.3:0.1.4-SNAPSHOT
proto-google-cloud-beyondcorp-clientconnectorservices-v1:0.1.3:0.1.4-SNAPSHOT
grpc-google-cloud-beyondcorp-clientconnectorservices-v1:0.1.3:0.1.4-SNAPSHOT
6 changes: 3 additions & 3 deletions java-beyondcorp-clientgateways/versions.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Format:
# module:released-version:current-version

google-cloud-beyondcorp-clientgateways:0.0.0:0.1.0-SNAPSHOT
proto-google-cloud-beyondcorp-clientgateways-v1:0.0.0:0.1.0-SNAPSHOT
grpc-google-cloud-beyondcorp-clientgateways-v1:0.0.0:0.1.0-SNAPSHOT
google-cloud-beyondcorp-clientgateways:0.1.0:0.1.1-SNAPSHOT
proto-google-cloud-beyondcorp-clientgateways-v1:0.1.0:0.1.1-SNAPSHOT
grpc-google-cloud-beyondcorp-clientgateways-v1:0.1.0:0.1.1-SNAPSHOT

0 comments on commit 323fe5f

Please sign in to comment.