diff --git a/config.py b/config.py index b97be67..8e6384b 100644 --- a/config.py +++ b/config.py @@ -79,8 +79,6 @@ config = { 'Distrib_Author': 'TanninOne', # the current distribution (and the original Author) 'Work_Author': '', # yourself - 'gh_cli_token': '', - # manualy set all versions '7zip_version': '19.00', 'boost_version': '1.73.0', @@ -161,7 +159,6 @@ config['paths'] = { # 'graphviz': path_or_default("dot.exe", [["Graphviz2.38", "bin"]]), 'cmake': path_or_default("cmake.exe", [["CMake", "bin"]]), 'git': path_or_default("git.exe", [["Git", "bin"]]), - 'gh': path_or_default("gh.exe", [["GitHub CLI"]]), 'perl': path_or_default("perl.exe", [["StrawberryPerl", "perl", "bin"], ["Strawberry", "perl", "bin"]]), #'svn': path_or_default("svn.exe", [["SlikSvn", "bin"]]), '7z': path_or_default("7z.exe", [["7-Zip"]]), diff --git a/makefile.uni.py b/makefile.uni.py index be8654a..41e095f 100755 --- a/makefile.uni.py +++ b/makefile.uni.py @@ -148,10 +148,6 @@ for author, git_path, path, branch, dependencies, Build in [ if config['Appveyor_Build']: appveyor_cmake_step = cmake.CMakeJOM().arguments(cmake_param).install() - gh_pr_branch = None - - if os.getenv('APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH') is not None: - gh_pr_branch = '{}:{}'.format(os.getenv('APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME'), os.getenv('APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH')) if git_path != "cmake_common": appveyor_cmake_step.depend("cmake_common") @@ -162,7 +158,7 @@ for author, git_path, path, branch, dependencies, Build in [ if os.getenv("APPVEYOR_PROJECT_NAME","") == git_path: source_retrieval_step = appveyor.SetProjectFolder(os.getenv("APPVEYOR_BUILD_FOLDER", "")) else: - source_retrieval_step = github.Source(author, git_path, branch, feature_branch=config['Feature_Branch'], super_repository=tl_repo, gh_pr=gh_pr_branch).set_destination(path) + source_retrieval_step = github.Source(author, git_path, branch, feature_branch=config['Feature_Branch'], super_repository=tl_repo).set_destination(path) if git_path == "modorganizer" and config['override_build_version']: #add patching step that depends on source retrieval diff --git a/unibuild/modules/git.py b/unibuild/modules/git.py index 0c1c5de..6dc3225 100755 --- a/unibuild/modules/git.py +++ b/unibuild/modules/git.py @@ -80,7 +80,7 @@ class SuperRepository(Task): class Clone(Repository): - def __init__(self, url, branch, feature_branch=None, super_repository=None, update=True, commit=None, shallowclone=False, gh_pr=None): + def __init__(self, url, branch, feature_branch=None, super_repository=None, update=True, commit=None, shallowclone=False): if config['shallowclone']: self.shallowclone = True super(Clone, self).__init__(url, branch, feature_branch) @@ -89,7 +89,6 @@ class Clone(Repository): self.__update = update self.__commit = commit self.__shallowclone = shallowclone - self.__gh_pr = gh_pr if self._feature_branch is not None: proc = Popen([config['paths']['git'], "ls-remote", "--heads", "--exit-code", self._url, self._feature_branch], @@ -152,12 +151,7 @@ class Clone(Repository): logging.error("failed to clone repository %s (returncode %s)", self._url, proc.returncode) return False - if self.__gh_pr is not None: - proc = Popen([config['paths']['gh'], "pr", "checkout", self.__gh_pr], - cwd=self.__super_repository.path, - env=config['__environment']) - proc.communicate() - elif self.__commit is not None: + if self.__commit is not None: if self.__shallowclone: proc = Popen([config['paths']['git'], "checkout","--depth", "1", self.__commit], cwd=self._context["build_path"], diff --git a/unibuild/modules/github.py b/unibuild/modules/github.py index d8ca70b..554ab50 100755 --- a/unibuild/modules/github.py +++ b/unibuild/modules/github.py @@ -43,10 +43,10 @@ class Tag(URLDownload): class Source(Clone): - def __init__(self, author, project, branch="master", feature_branch=None, super_repository=None, update=True, commit=None, shallowclone=False, gh_pr=None): + def __init__(self, author, project, branch="master", feature_branch=None, super_repository=None, update=True, commit=None, shallowclone=False): if config['shallowclone']: self.shallowclone = True super(Source, self).__init__("https://github.com/{author}/{project}.git".format(author=author, project=project), - branch, feature_branch, super_repository, update, commit, shallowclone, gh_pr) + branch, feature_branch, super_repository, update, commit, shallowclone) self.set_destination(project) diff --git a/unibuild/utility/config_setup.py b/unibuild/utility/config_setup.py index 451c691..5ad6362 100644 --- a/unibuild/utility/config_setup.py +++ b/unibuild/utility/config_setup.py @@ -110,7 +110,6 @@ def dump_config(): logging.debug(" Config: config['paths']['cmake']=%s", config['paths']['cmake']) logging.debug(" Config: config['paths']['jom']=%s", config['paths']['jom']) logging.debug(" Config: config['paths']['git']=%s", config['paths']['git']) - logging.debug(" Config: config['paths']['gh']=%s", config['paths']['gh']) logging.debug(" Config: config['paths']['perl']=%s", config['paths']['perl']) #logging.debug(" Config: config['paths']['ruby']=%s", config['paths']['ruby']) #logging.debug(" Config: config['paths']['svn']=%s", config['paths']['svn']) diff --git a/unimake.py b/unimake.py index 576a0f4..ff4ebc6 100644 --- a/unimake.py +++ b/unimake.py @@ -87,8 +87,6 @@ def check_prerequisites_config(): return False if not config['paths']['git']: return False - if not config['paths']['gh']: - return False if not config['paths']['perl']: return False if config["Installer"]: @@ -120,10 +118,6 @@ def main(): print('\nMissing prerequisites listed above - cannot continue') exit(1) - from subprocess import Popen, PIPE - p = Popen([config['paths']['gh'], 'auth', 'login', '--with-token'], stdout=PIPE, stdin=PIPE, stderr=PIPE, text=True) - stdout_data = p.communicate(input=config['gh_cli_token'])[0] - for d in ["download", "build", "progress", "install"]: if not os.path.exists(config["paths"][d]): os.makedirs(config["paths"][d])