def run(self): sorted_pkgs = dag_run(self.__dag) software_root = self.__config_version.config['software_root'] release_version = self.__config_version.config['version'] env = Env() env.clean() env.set_release(software_root, release_version) global_env = self.__config_release.get('setting', {}).get('global_env', {}) new_global_env = {} for k, v in global_env.items(): new_global_env[k] = v.format(**self.__config_version.config) env.set_global(new_global_env) path_usage = self.__config_release.get('setting', {}).get('path_usage', {}) for pkg in sorted_pkgs: pkg_info = self.__pkg_mgr.package_info(pkg) env.set_package(path_usage, pkg_info) env_change = env.env_change() _logger.info('From software root: {0}'.format(software_root)) _logger.info('Using version: {0}'.format(release_version)) _logger.info('Current platform: {0}'.format( self.__config_version.config['platform'])) return env_change
def run(self): sorted_pkgs = dag_run(self.__dag) env = Env() env.clean() env.set_release(self.__config_version.config['release_root'], self.__config_version.config['version']) for pkg in sorted_pkgs: if pkg not in self.__config_release.config['attribute']: continue path_mode = self.__config_release.config['main'].get('path_mode', {}) pkg_config = { 'name': pkg, 'package': self.__config_release.config['package'].get(pkg, {}), 'attribute': self.__config_release.config['attribute'].get(pkg, {}), 'format': self.__exe_config[pkg], } env.set_package(path_mode, pkg_config) return env.final_all_env()