Revert "Test gh integration"

This reverts commit a3b89b18
This commit is contained in:
Jeremy Rimpo
2020-09-21 10:39:23 -05:00
parent 8aee0938b5
commit ed3a0d5671
6 changed files with 5 additions and 25 deletions
-3
View File
@@ -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"]]),
+1 -5
View File
@@ -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
+2 -8
View File
@@ -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"],
+2 -2
View File
@@ -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)
-1
View File
@@ -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'])
-6
View File
@@ -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])