Ejemplo n.º 1
0
 def build(self):
     if self.build_commands is None:
         return True
     logger.info('building %s' % Color.GREEN+self.name+Color.END)
     op_ok = False
     with chdir(self.path):
         for cmd in self.build_commands:
             op_ok = run_command(cmd)
             if not op_ok:
                 break
     return op_ok
Ejemplo n.º 2
0
 def update(self):
     if self.app_type not in self.update_commands:
         logger.error('unsupported VCS for application %s' % Color.GREEN+self.name+Color.END)
         return False
     op_ok = False
     with chdir(self.path):
         cmds = self.update_commands[self.app_type]
         for cmd in cmds:
             op_ok = run_command(cmd)
             if not op_ok:
                 break
     self.is_updated = op_ok  # TODO: check if some changes have been pulled
     return op_ok