From 9f2ba7e438ceb539afaa4e6274034cab47c25cd4 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sat, 15 Sep 2018 11:48:57 +0800 Subject: [PATCH] ok --- gitlab/githelper.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gitlab/githelper.py b/gitlab/githelper.py index ded8189..481ebd1 100644 --- a/gitlab/githelper.py +++ b/gitlab/githelper.py @@ -18,7 +18,7 @@ for proj in projects: http_url_to_repo = proj['http_url_to_repo'] name = proj['name'] path = proj['namespace']['path'] - if name != 'game1008': + if path != 'publish' or not ('game1008' in name): continue if not os.path.exists('repository/%s' % path): os.mkdir('repository/%s' % (path)) @@ -27,4 +27,9 @@ for proj in projects: os.system('cd repository/%s/%s && git pull' % (path, name)) os.system('cd repository/%s/%s && git submodule init' % (path, name)) os.system('cd repository/%s/%s && git submodule update' % (path, name)) - #print('%s/%s' % (path, name)) + submodules = os.listdir('repository/%s/%s/third_party' % (path, name)) + for module_name in submodules: + os.system('cd repository/%s/%s/third_party/%s && git checkout master && git pull' % + (path, name, module_name)) + os.system('cd repository/%s/%s && git commit -am "同步代码" && git push' % (path, name)) + print('%s/%s' % (path, name))