def METHOD_NAME():
    parser = argparse.ArgumentParser(description="A small utility for updating the project's version and creating tags.")
    parser.add_argument("--bump-only", action="store_true", help="Whether only the version should be bumped, without tagging the current version.")
    args = parser.parse_args()
    title("Project Version Updater")
    if not git_working_dir_is_clean(PROJECT_DIR):
        print("Commit any pending changes first to make sure the working directory is in a clean state!")
        return
    if git_branch(PROJECT_DIR) != "main":
        print("Switch to the main branch first!")
        return
    properties = PropertiesFile(str(PROJECT_DIR / "gradle.properties"))
    version = parse_version(properties[PROJECT_VERSION_KEY])
    # Current version
    if not args.bump_only:
        print()
        print(f"Releasing version {version}.")
        print()
        # Fetch new changelog message from user
        temp = tempfile.NamedTemporaryFile(delete=False)
        temp_path = Path(temp.name).absolute()
        history = git_history_since_last_tag(PROJECT_DIR)
        formatted_history = [f"# {commit}" for commit in history]
        initial_message = [
            "",
            "",
            "# Please enter a changelog/release message.",
            f"# This is the history since the last tag:"
        ] + formatted_history
        with open(temp_path, "w") as temp_contents:
            temp_contents.write("\n".join(initial_message))
        subprocess.call([EDITOR, str(temp_path)])
        with open(temp_path, "r") as temp_contents:
            changelog_message = [line.strip() for line in temp_contents.readlines() if not line.startswith("#") and len(line.strip()) > 0]
        temp.close()
        temp_path.unlink()
        if not changelog_message:
            print("No message, exiting...")
            return
        print("Updating changelog...")
        changelog = ChangelogFile(PROJECT_DIR / "CHANGELOG.md")
        changelog.prepend_version(version, changelog_message)
        print("Creating Git tag...")
        tag_message = "\n".join([f"Version {version}", ""] + changelog_message)
        subprocess.run(["git", "tag", "-a", f"{version}", "-m", tag_message], cwd=PROJECT_DIR)
    # Next version
    increment = None
    while increment not in INCREMENTS.keys():
        increment = input("How do you want to increment? [major/minor/patch] ")
    new_version = INCREMENTS[increment](version)
    # Apply new (development) version to project
    print(f"Updating next dev version to {new_version}...")
    properties[PROJECT_VERSION_KEY] = str(new_version)
    print("Creating Git commit for next dev version...")
    commit_message = f"Bump version to {new_version}"
    subprocess.run(["git", "add", "."], cwd=PROJECT_DIR)
    subprocess.run(["git", "commit", "-m", commit_message], cwd=PROJECT_DIR)