def update_features_page(details: ReleaseDetails) -> None: features_file = '../doc/mdsource/Features.source.md' content = read_file(features_file) update_file = PrepareDocumentationRelease.prepare_update_features_page( details.old_version_as_text(), details.new_version_as_text(), content) update_file(features_file)
def get_prepare_release(self) -> CppGeneration: set_home_directory() old_version = Version(8, 4, 0) new_version = Version(8, 5, 0) deploy = False release_details = ReleaseDetails(old_version, new_version, deploy) return CppGeneration(release_details)
def get_deploy_release(self) -> DeployRelease: set_home_directory() old_version = Version(0, 0, 1) new_version = Version(0, 1, 0) deploy = False release_details = ReleaseDetails(old_version, new_version, deploy, ProjectDetails()) return DeployRelease(release_details)
def get_prepare_release(self) -> CppGeneration: set_home_directory() old_version = Version(0, 0, 1) new_version = Version(0, 1, 0) deploy = False release_details = ReleaseDetails(old_version, new_version, deploy, qt_project_details()) return CppGeneration(release_details)
def prepare_release_notes(details: ReleaseDetails) -> None: replace_text_in_file(release_constants.xxx_release_notes_path, 'v.x.y.z', details.new_version_as_text()) shutil.move(release_constants.xxx_release_notes_path, details.new_release_notes_path) # Make sure the above move has finished, before we create the new xxx file: time.sleep(1) shutil.copyfile(release_constants.template_release_notes_path, release_constants.xxx_release_notes_path)
def build(update_version: Callable[[Version], Version], deploy: bool) -> None: old_version = load_current_version() new_version = update_version(old_version) release_details = ReleaseDetails(old_version, new_version, deploy) prepare_release = PrepareRelease(release_details) prepare_release.prepare_everything() if not release_details.push_to_production: print("Everything worked - didn't commit or push") else: deploy_release = DeployRelease(release_details) deploy_release.push_everything_live()
def build(update_version: Callable[[Version], Version], deploy: bool, project_details: ProjectDetails) -> None: old_version = set_working_directory_and_load_current_version(project_details.library_folder_name) new_version = update_version(old_version) release_details = ReleaseDetails(old_version, new_version, deploy, project_details) prepare_release = PrepareRelease(release_details) prepare_release.prepare_everything() if not release_details.push_to_production: print("Everything worked - didn't commit or push") else: deploy_release = DeployRelease(release_details) deploy_release.push_everything_live()
#! /usr/bin/env python3 from scripts import version from scripts.conan_release import DeployConanRelease from scripts.deploy_release import DeployRelease from scripts.prepare_release import load_current_version from scripts.release_details import ReleaseDetails if __name__ == '__main__': old_version = load_current_version() new_version = old_version.clone() details = ReleaseDetails(old_version, new_version, True) deploy_release = DeployRelease(details) deploy_release.push_everything_live(start_at_conan=True)
def update_readme_and_docs(details: ReleaseDetails) -> None: with use_directory(".."): replace_text_in_file("mdsource/README.source.md", details.old_version_as_text(), details.new_version_as_text())
#! /usr/bin/env python3 import scripts_qt.include_approvals_path # Note This is used! from scripts.deploy_release import DeployRelease from scripts.prepare_release import set_working_directory_and_load_current_version from scripts.release_details import ReleaseDetails from scripts_qt.qt_project_details import qt_project_details if __name__ == '__main__': project_details = qt_project_details() old_version = set_working_directory_and_load_current_version( project_details.library_folder_name) new_version = old_version.clone() details = ReleaseDetails(old_version, new_version, True, project_details) deploy_release = DeployRelease(details) deploy_release.push_everything_live(start_at_conan=True)
def test(self) -> None: details = ReleaseDetails(Version(1, 2, 3), Version(1, 2, 4), True, ProjectDetails()) scrubber = Options().with_scrubber( lambda t: t.replace('"../../conan-', '"../../../conan/conan-')) verify_as_json(details, options=scrubber)
def test(self) -> None: details = ReleaseDetails(Version(1, 2, 3), Version(1, 2, 4), True, ProjectDetails()) verify_as_json(details)