Skip to content

Commit 58c3da2

Browse files
committed
remove check_docker_file_versions
The Docker versions are bumped after tagging the release. This check may not be expected to succeed during a release.
1 parent a82edad commit 58c3da2

File tree

1 file changed

+0
-52
lines changed

1 file changed

+0
-52
lines changed

etc/make_release.py

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,6 @@ def release(jira_creds_file,
155155
click.echo('Nothing to do here...exiting!', err=True)
156156
sys.exit(1)
157157

158-
check_docker_file_versions(release_version)
159-
160158
if not working_dir_on_valid_branch(release_version):
161159
# working_dir_on_valid_branch() has already produced an error message
162160
sys.exit(1)
@@ -231,56 +229,6 @@ def release(jira_creds_file,
231229
release_notes_text, output_file, quiet)
232230

233231

234-
def check_docker_file_versions(mongo_cxx_release_ver: str):
235-
"""
236-
Checks that `MONGOC_VERSION` defined in Dockerfiles matches `LIBMONGOC_REQUIRED_VERSION` from CMakeLists.txt.
237-
Checks that `MONGOCXX_VERSION` defined in Docker Makefiles matches version to be released: `mongo_cxx_release_ver`.
238-
"""
239-
240-
extras_docker = pathlib.Path("./extras/docker")
241-
dockerfiles = extras_docker.rglob("Dockerfile")
242-
makefiles = extras_docker.rglob("Makefile")
243-
244-
# Get LIBMONGOC_REQUIRED_VERSION from CMakeLists.txt.
245-
got_LIBMONGOC_REQUIRED_VERSION = None
246-
contents = pathlib.Path("CMakeLists.txt").read_text()
247-
matches = re.findall(
248-
r"set\(LIBMONGOC_REQUIRED_VERSION\s+(.*?)\)", contents)
249-
if len(matches) != 1:
250-
click.echo('Expected to match one LIBMONGOC_REQUIRED_VERSION, got: {}'.format(
251-
matches), err=True)
252-
sys.exit(1)
253-
got_LIBMONGOC_REQUIRED_VERSION = matches[0]
254-
255-
# Check that `MONGOC_VERSION` defined in Dockerfiles matches `LIBMONGOC_REQUIRED_VERSION` from CMakeLists.txt.
256-
for dockerfile in dockerfiles:
257-
contents = pathlib.Path(dockerfile).read_text()
258-
matches = re.findall(r"MONGOC_VERSION=(.*)", contents)
259-
if len(matches) != 1:
260-
click.echo('Expected to match one MONGOC_VERSION in {}, got: {}'.format(
261-
dockerfile, matches), err=True)
262-
sys.exit(1)
263-
got_MONGOC_VERSION = matches[0]
264-
if got_MONGOC_VERSION != got_LIBMONGOC_REQUIRED_VERSION:
265-
click.echo('Expected MONGOC_VERSION({}) in {} to match LIBMONGOC_REQUIRED_VERSION({})'.format(
266-
got_MONGOC_VERSION, dockerfile, got_LIBMONGOC_REQUIRED_VERSION), err=True)
267-
sys.exit(1)
268-
269-
# Check that `MONGOCXX_VERSION` defined in Docker Makefiles matches version to be released: `mongo_cxx_release_ver`.
270-
for makefile in makefiles:
271-
contents = pathlib.Path(makefile).read_text()
272-
matches = re.findall(r"MONGOCXX_VERSION=(.*)", contents)
273-
if len(matches) != 1:
274-
click.echo('Expected to match one MONGOCXX_VERSION in {}, got: {}'.format(
275-
makefile, matches), err=True)
276-
sys.exit(1)
277-
got_MONGOCXX_VERSION = matches[0]
278-
if got_MONGOCXX_VERSION != mongo_cxx_release_ver:
279-
click.echo('Expected MONGOCXX_VERSION({}) in {} to match release tag({})'.format(
280-
got_MONGOCXX_VERSION, makefile, mongo_cxx_release_ver), err=True)
281-
sys.exit(1)
282-
283-
284232
def check_libmongoc_version():
285233
got_LIBMONGOC_REQUIRED_VERSION = None
286234
got_LIBMONGOC_DOWNLOAD_VERSION = None

0 commit comments

Comments
 (0)