File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848 admin_version_path = "google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/Version.java"
4949 if os .path .exists (admin_version_path ):
5050 target_path = "google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminVersion.java"
51- with open (admin_version_path , 'r' ) as f :
51+ with open (admin_version_path , 'r' , encoding = 'utf-8' ) as f :
5252 content = f .read ()
5353 content = content .replace ("class Version" , "class FirestoreAdminVersion" )
54- with open (target_path , 'w' ) as f :
54+ with open (target_path , 'w' , encoding = 'utf-8' ) as f :
5555 f .write (content )
5656 os .remove (admin_version_path )
5757
58- # Replace Version.VERSION with FirestoreAdminVersion.VERSION in FirestoreAdminStubSettings.java
59- settings_path = "google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java"
60- if os .path .exists (settings_path ):
61- with open (settings_path , 'r' ) as f :
62- content = f .read ()
63- content = content .replace ("Version.VERSION" , "FirestoreAdminVersion.VERSION" )
64- with open (settings_path , 'w' ) as f :
65- f .write (content )
58+ # Replace Version.VERSION with FirestoreAdminVersion.VERSION in stub files
59+ s .replace (
60+ "google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/**/*.java" ,
61+ "Version.VERSION" ,
62+ "FirestoreAdminVersion.VERSION" ,
63+ )
6664s .remove_staging_dirs ()
6765java .common_templates (
6866 monorepo = True ,
You can’t perform that action at this time.
0 commit comments