Esempio n. 1
0
 def update_vcpkg_version_files(details: ReleaseDetails,
                                commit_message: str) -> None:
     run(["brew", "install", "vcpkg"])
     run([
         "vcpkg", "x-add-version",
         f"--vcpkg-root={details.vcpkg_details.vcpkg_repo_dir}",
         details.project_details.vcpkg_directory_name
     ])
     GitUtilities.add_and_commit_everything(
         details.vcpkg_details.vcpkg_repo_dir, commit_message)
Esempio n. 2
0
    def test_vcpkg_and_create_pr(details: ReleaseDetails) -> None:
        if not details.project_details.update_vcpkg:
            return

        new_version_without_v = details.new_version.get_version_text_without_v(
        )
        commit_message = F'[{details.project_details.vcpkg_directory_name}] Update to {new_version_without_v}'
        GitUtilities.add_and_commit_everything(
            details.vcpkg_details.vcpkg_repo_dir, commit_message)
        DeployVcpkgRelease.update_vcpkg_version_files(details, commit_message)
        GitUtilities.push_active_branch_origin(
            details.vcpkg_details.vcpkg_repo_dir)
        DeployVcpkgRelease.create_pull_request(details)
Esempio n. 3
0
    def test_conan_and_create_pr(details: ReleaseDetails) -> None:
        if not details.project_details.update_conan:
            return

        new_version_without_v = details.new_version.get_version_text_without_v()
        # See test_conan_release.py's disabled_test_all_conan_versions_build() if you want to test
        # that conan builds against all supported library versions.
        DeployConanRelease.test_conan_build_passes(details.conan_details, new_version_without_v)

        GitUtilities.add_and_commit_everything(details.conan_details.conan_repo_dir,
                                               F'Add {details.project_details.conan_directory_name} {new_version_without_v}')
        GitUtilities.push_active_branch_origin(details.conan_details.conan_repo_dir)

        DeployConanRelease.create_pull_request(details)
Esempio n. 4
0
def build(update_version: Callable[[Version], Version]) -> None:
    old_version = load_current_version()
    new_version = update_version(old_version)
    release_details = ReleaseDetails(old_version, new_version)

    check_repo()
    publish_to_maven(release_details)
    PrepareDocumentationRelease.prepare_documentation(release_details)
    new_version.write("./build")
    GitUtilities.add_and_commit_everything(".", new_version.get_version_text())
    set_snapshot(release_details)
    GitUtilities.add_and_commit_everything(".", "set Snapshot")
    GitUtilities.push_active_branch_origin(".")
    PrepareStarterProjectRelease.prepare_starter_project(release_details)

    print("Done")
Esempio n. 5
0
 def prepare_starter_project(details: ReleaseDetails) -> None:
     project_dir = release_constants.starter_project_dir
     GitUtilities.reset_and_clean_working_directory(project_dir)
     PrepareStarterProjectRelease.update_pom(details)
     GitUtilities.add_and_commit_everything(project_dir, details.new_version.get_version_text())
     GitUtilities.push_active_branch_origin(project_dir)