83
83
default = 'origin' ,
84
84
show_default = True ,
85
85
help = 'The remote reference which points to the mongodb/mongo-cxx-driver repo' )
86
- @click .option ('--c-driver-install-dir' ,
87
- default = os .getcwd () + '/../mongoc' ,
88
- show_default = True ,
89
- help = 'When building the C driver and libmongocrypt, install to this directory' )
90
86
@click .option ('--c-driver-build-ref' ,
91
- default = '1.22.1 ' ,
87
+ default = '11e31e3e ' ,
92
88
show_default = True ,
93
89
help = 'When building the C driver, build at this Git reference' )
94
- @click .option ('--mongocrypt-build-ref' ,
95
- default = '1.5.2' ,
96
- show_default = True ,
97
- help = 'When building libmongocrypt, build at this Git reference' )
98
90
@click .option ('--with-c-driver' ,
99
91
help = 'Instead of building the C driver, use the one installed at this path' )
100
92
@click .option ('--dist-file' ,
@@ -119,9 +111,7 @@ def release(jira_creds_file,
119
111
github_token_file ,
120
112
allow_open_issues ,
121
113
remote ,
122
- c_driver_install_dir ,
123
114
c_driver_build_ref ,
124
- mongocrypt_build_ref ,
125
115
with_c_driver ,
126
116
dist_file ,
127
117
skip_distcheck ,
@@ -180,7 +170,7 @@ def release(jira_creds_file,
180
170
click .echo ('Specified distribution tarball does not exist...exiting!' , err = True )
181
171
sys .exit (1 )
182
172
else :
183
- c_driver_dir = ensure_c_driver (c_driver_install_dir , c_driver_build_ref , mongocrypt_build_ref , with_c_driver , quiet )
173
+ c_driver_dir = ensure_c_driver (c_driver_build_ref , with_c_driver , quiet )
184
174
if not c_driver_dir :
185
175
click .echo ('C driver not built or not found...exiting!' , err = True )
186
176
sys .exit (1 )
@@ -331,14 +321,13 @@ def check_pre_release(tag_name):
331
321
332
322
return not bool (release_re .match (tag_name ))
333
323
334
- def ensure_c_driver (c_driver_install_dir , c_driver_build_ref , mongocrypt_build_ref , with_c_driver , quiet ):
324
+ def ensure_c_driver (c_driver_build_ref , with_c_driver , quiet ):
335
325
"""
336
326
Ensures that there is a properly installed C driver, returning the location
337
327
of the C driver installation. If the with_c_driver parameter is set and
338
328
points to a proper installation of the C driver, then this function simply
339
329
returns that directory. Otherwise, delegates to another function to build
340
- the C driver and install it to the directory specified by the
341
- c_driver_install_dir parameter.
330
+ the C driver and install it to the mongoc directory.
342
331
"""
343
332
344
333
if with_c_driver :
@@ -350,32 +339,27 @@ def ensure_c_driver(c_driver_install_dir, c_driver_build_ref, mongocrypt_build_r
350
339
click .echo ('A required component of the C driver is missing!' , err = True )
351
340
return None
352
341
353
- return build_c_driver (c_driver_install_dir , c_driver_build_ref , mongocrypt_build_ref , quiet )
342
+ return build_c_driver (c_driver_build_ref , quiet )
354
343
355
- def build_c_driver (c_driver_install_dir , c_driver_build_ref , mongocrypt_build_ref , quiet ):
344
+ def build_c_driver (c_driver_build_ref , quiet ):
356
345
"""
357
- Build the C driver and install to the specified directory. If the build is
346
+ Build the C driver and install to the mongoc directory. If the build is
358
347
successful, then return the directory where the C driver was installed,
359
348
otherwise return None.
360
349
"""
361
350
362
- mongoc_prefix = os .path .abspath (c_driver_install_dir )
363
-
364
351
if not quiet :
365
- click .echo (f'Building C Driver at { mongoc_prefix } (this could take several minutes)' )
352
+ click .echo (f'Building C Driver (this could take several minutes)' )
366
353
click .echo ('Pass --with-c-driver to use an existing installation' )
367
354
368
355
env = os .environ .copy ()
369
- env ['PREFIX' ] = mongoc_prefix
370
- env ['MONGOC_VERSION' ] = c_driver_build_ref
371
- env ['MONGOCRYPT_VERSION' ] = mongocrypt_build_ref
356
+ env ['mongoc_version' ] = c_driver_build_ref
372
357
run_shell_script ('./.evergreen/install_c_driver.sh' , env = env )
373
358
374
359
if not quiet :
375
- click .echo ('C Driver build was successful.' )
376
- click .echo ('Version "{}" was installed to "{}".'
377
- .format (c_driver_build_ref , mongoc_prefix ))
378
- return mongoc_prefix
360
+ click .echo ('Build of C Driver version "{}" was successful.' .format (c_driver_build_ref ))
361
+
362
+ return './mongoc'
379
363
380
364
def build_distribution (release_tag , release_version , c_driver_dir , quiet , skip_distcheck ):
381
365
"""
0 commit comments