8000 Add git command · python-doc-tw/pydoc_autobuild@5baf8c5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5baf8c5

Browse files
committed
Add git command
1 parent 6b30b65 commit 5baf8c5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

doc_tasks/tasks.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@ def run_command_under_doc_root(cmd, catched=True):
4444
return process
4545

4646

47+
def git_add_commit_push():
48+
git_processes = {}
49+
cmds = {
50+
'git_add': ['git', 'add', 'locale/*'],
51+
'git_commit': ['git', 'commit', '-m', 'Update translation (auto daily)'],
52+
'git_push': ['git', 'push'],
53+
}
54+
for cmd_name, cmd in cmds.items():
55+
git_processes[cmd_name] = run_command_under_doc_root(cmd)
56+
return git_processes
57+
58+
4759
def tx_pull(page=None):
4860
cmd = [TX, 'pull', '-l', LANG]
4961
if page is not None:

0 commit comments

Comments
 (0)
0