Exemple #1
0
 def _check_for_ant(self):
     ant = which('ant')
     if not ant:
         message = "You do not have ant on your $PATH. Cannot build Buck."
         if sys.platform == "darwin":
             message += "\nTry running 'brew install ant'."
         raise BuckToolException(message)
     return ant
Exemple #2
0
 def _check_for_ant(self):
     ant = which('ant')
     if not ant:
         message = "You do not have ant on your $PATH. Cannot build Buck."
         if sys.platform == "darwin":
             message += "\nTry running 'brew install ant'."
         raise BuckToolException(message)
     return ant
Exemple #3
0
    def __init__(self, buck_bin_dir, buck_project):
        super(BuckRepo, self).__init__(buck_project)

        self._buck_dir = self._platform_path(os.path.dirname(buck_bin_dir))
        self._build_success_file = os.path.join(self._buck_dir, "build", "successful-build")

        dot_git = os.path.join(self._buck_dir, ".git")
        self._is_git = os.path.exists(dot_git) and os.path.isdir(dot_git) and which("git") and sys.platform != "cygwin"
        self._is_buck_repo_dirty_override = os.environ.get("BUCK_REPOSITORY_DIRTY")

        buck_version = buck_project.buck_version
        if self._is_git and not buck_project.has_no_buck_check and buck_version:
            revision = buck_version[0]
            branch = buck_version[1] if len(buck_version) > 1 else None
            self._checkout_and_clean(revision, branch)

        self._build()
Exemple #4
0
    def __init__(self, buck_bin_dir, buck_project):
        super(BuckRepo, self).__init__(buck_project)

        self._buck_dir = self._platform_path(os.path.dirname(buck_bin_dir))
        self._build_success_file = os.path.join(
            self._buck_dir, "build", "successful-build")

        dot_git = os.path.join(self._buck_dir, '.git')
        self._is_git = os.path.exists(dot_git) and os.path.isdir(dot_git) and which('git') and \
            sys.platform != 'cygwin'
        self._is_buck_repo_dirty_override = os.environ.get('BUCK_REPOSITORY_DIRTY')

        buck_version = buck_project.buck_version
        if self._is_git and not buck_project.has_no_buck_check and buck_version:
            revision = buck_version[0]
            branch = buck_version[1] if len(buck_version) > 1 else None
            self._checkout_and_clean(revision, branch)

        self._build()