Example #1
0
 def pre_build(self, user, install_path, **kwargs):
     errors = []
     self._release(self.settings.pre_build_commands, errors=errors)
     if errors and self.settings.cancel_on_error:
         raise ReleaseHookCancellingError(
             "The following pre-build commands failed:\n%s" %
             '\n\n'.join(errors))
Example #2
0
    def pre_release(self, user, install_path, **kwargs):
        errors = []
        self._execute_commands(self.settings.pre_release_commands,
                               install_path=install_path,
                               package=self.package,
                               errors=errors)

        if errors and self.settings.cancel_on_error:
            raise ReleaseHookCancellingError(
                "The following pre-release commands failed:\n%s" %
                '\n\n'.join(errors))