Execute complete build process
(self)
| 867 | self.start_time = time.time() |
| 868 | |
| 869 | def run_build(self) -> bool: |
| 870 | """Execute complete build process""" |
| 871 | logger.step(f"Starting {PROJECT_NAME} v{VERSION} Build Process") |
| 872 | logger.info(f"Build configuration: {BUILD_CONFIG}") |
| 873 | logger.info(f"Platform: {platform.platform()}") |
| 874 | logger.info(f"Python: {platform.python_version()}") |
| 875 | |
| 876 | # Execute all build steps |
| 877 | for step_name, step_function in self.build_steps: |
| 878 | try: |
| 879 | logger.info(f"Executing: {step_name}") |
| 880 | |
| 881 | if not step_function(): |
| 882 | logger.error(f"Build step failed: {step_name}") |
| 883 | self.failed_steps.append(step_name) |
| 884 | |
| 885 | # Critical steps that should stop the build |
| 886 | critical_steps = ["Environment Validation", "Dependency Installation"] |
| 887 | if step_name in critical_steps: |
| 888 | logger.error("Critical step failed, stopping build") |
| 889 | break |
| 890 | else: |
| 891 | logger.success(f"Build step completed: {step_name}") |
| 892 | |
| 893 | except KeyboardInterrupt: |
| 894 | logger.error("Build interrupted by user") |
| 895 | return False |
| 896 | |
| 897 | except Exception as e: |
| 898 | logger.error(f"Unexpected error in {step_name}: {e}") |
| 899 | self.failed_steps.append(step_name) |
| 900 | import traceback |
| 901 | logger.error(f"Traceback: {traceback.format_exc()}") |
| 902 | |
| 903 | # Generate build report |
| 904 | return self._generate_build_report() |
| 905 | |
| 906 | def _generate_build_report(self) -> bool: |
| 907 | """Generate comprehensive build report""" |