From: Mathias Klette Date: Tue, 3 Jan 2012 12:44:11 +0000 (+0100) Subject: Revert "OFFICE-797: adding submodule handling" X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=1e28fab4dc7905d35b31792adb6b058ac8a09b65;p=profitbricks%2Fjenkins-build-scripts.git Revert "OFFICE-797: adding submodule handling" This reverts commit 2c972c45ca8abd783fb0a06a7e769ecac8c2f852. --- diff --git a/debian_build.py b/debian_build.py index f042b00..5e6e261 100755 --- a/debian_build.py +++ b/debian_build.py @@ -269,13 +269,6 @@ if __name__ == '__main__': logger_loud_error('git checkout %s was not successfull' % GIT_UPSTREAM_BRANCH) exit_error() - # now let's update submodules - if git_helper.git_checkout_submodule(): - logger.info('git submodule completed') - else: - logger_loud_error('git submodule failed') - exit_error() - # we need to make sure our jenkins config is used, so let's delete any # other config available in repository that might be prefered cleanup_files = ('.gbp.conf', 'debian/gbp.conf', '.git/gbp.conf') diff --git a/lib/git_helper.py b/lib/git_helper.py index fb3d74e..f6020b5 100644 --- a/lib/git_helper.py +++ b/lib/git_helper.py @@ -151,54 +151,6 @@ def git_checkout_branch(branch_name): ) return True -def git_checkout_submodule(): - """ - Initialize and update any submodules which are used in the repository. - Git wont throw any errors when no submodules are used, so we can do it - every time. - """ - cmd = [GIT, 'submodule', 'init'] - cmdobj = subprocess.Popen( - cmd, - shell=False, - close_fds=True, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - env={'':''}, - cwd=os.getcwd() - ) - ret = cmdobj.wait() - out = cmdobj.stdout.read() - msg = '%s returned %s: ' % (' '.join(cmd), ret, out) - - if ret: - logger.error(msg) - return False - else: - logger.info(msg) - - cmd = [GIT, 'submodule', 'update'] - cmdobj = subprocess.Popen( - cmd, - shell=False, - close_fds=True, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - env={'':''}, - cwd=os.getcwd() - ) - ret = cmdobj.wait() - out = cmdobj.stdout.read() - msg = '%s returned %s: ' % (' '.join(cmd), ret, out) - - if ret: - logger.error(msg) - return False - else: - logger.info(msg) - - return True - def git_repo_has_branch(name): r = git.repo.Repo() for branch in r.branches: