cm_crowdin_sync: Allow custom username
Make it easier to modify the username and uncomment the commit line
Also update the commit message since we are out of the testing phase
Change-Id: I3903a09a0a7bed02cd6333e5de35d12597e87d1a
diff --git a/cm_crowdin_sync.py b/cm_crowdin_sync.py
index 616037e..cf66239 100755
--- a/cm_crowdin_sync.py
+++ b/cm_crowdin_sync.py
@@ -178,6 +178,9 @@
file_write.close()
def push_as_commit(path, name):
+ # CM gerrit nickname
+ username = 'your_nickname'
+
# Get path
path = os.getcwd() + '/' + path
@@ -185,8 +188,8 @@
repo = git.Repo(path)
repo.git.add(path)
try:
- repo.git.commit(m='DO NOT MERGE: Automatic translation import test commit')
-# repo.git.push('ssh://cobjeM@review.cyanogenmod.org:29418/' + name, 'HEAD:refs/for/cm-11.0')
+ repo.git.commit(m='Automatic translation import')
+ repo.git.push('ssh://' + username + '@review.cyanogenmod.org:29418/' + name, 'HEAD:refs/for/cm-11.0')
print 'Succesfully pushed commit for ' + name
except:
# If git commit fails, it's probably because of no changes.