@print_func_name
def prebuild_if_needed(self):
    self.fetch_and_apply_cache()
    subprocess.run(['bundle', 'exec', 'pod', 'install'], check=True)
    if (not os.path.isfile(self.delta_path)):
        logger.info('No change in prebuilt frameworks')
        return
    try:
        with open(self.delta_path) as f:
            FileUtils.create_dir(self.cache_path)
            data = f.read()
            data = re.sub('"', '', data)
            updatedMatches = re.findall('Updated: \\[(.*)\\]', data)
            if updatedMatches:
                updated = updatedMatches[0].strip()
                logger.info('Updated frameworks: {}'.format(updated))
                if len(updated):
                    libs = updated.split(',')
                    for lib in libs:
                        libName = lib.strip()
                        self.clean_cache(libName)
                        self.zip_to_cache(libName)
            deletedMatches = re.findall('Deleted: \\[(.*)\\]', data)
            if deletedMatches:
                deleted = deletedMatches[0].strip()
                logger.info('Deleted frameworks: {}'.format(deleted))
                if len(deleted):
                    libs = deleted.split(',')
                    for lib in libs:
                        self.clean_cache(lib.strip())
            FileUtils.copy_file_or_dir((self.prebuild_path + self.manifest_file), self.cache_path)
            self.push_all_to_git(self.cache_path)
    except Exception as e:
        raise e
@print_func_name
def prebuild_if_needed(self):
    self.fetch_and_apply_cache()
    subprocess.run(['bundle', 'exec', 'pod', 'install'], check=True)
    if (not os.path.isfile(self.delta_path)):
        logger.info('No change in prebuilt frameworks')
        return
    try:
        with open(self.delta_path) as f:
            FileUtils.create_dir(self.cache_path)
            data = f.read()
            data = re.sub('"', , data)
            updatedMatches = re.findall('Updated: \\[(.*)\\]', data)
            if updatedMatches:
                updated = updatedMatches[0].strip()
                logger.info('Updated frameworks: {}'.format(updated))
                if len(updated):
                    libs = updated.split(',')
                    for lib in libs:
                        libName = lib.strip()
                        self.clean_cache(libName)
                        self.zip_to_cache(libName)
            deletedMatches = re.findall('Deleted: \\[(.*)\\]', data)
            if deletedMatches:
                deleted = deletedMatches[0].strip()
                logger.info('Deleted frameworks: {}'.format(deleted))
                if len(deleted):
                    libs = deleted.split(',')
                    for lib in libs:
                        self.clean_cache(lib.strip())
            FileUtils.copy_file_or_dir((self.prebuild_path + self.manifest_file), self.cache_path)
            self.push_all_to_git(self.cache_path)
    except Exception as e:
        raise e