diff options
author | Luca Stefani <luca.stefani.ge1@gmail.com> | 2018-04-30 18:52:28 +0200 |
---|---|---|
committer | Luca Stefani <luca.stefani.ge1@gmail.com> | 2018-04-30 18:53:31 +0200 |
commit | 4cc9064951d3b038f18036f9d4e1da562b787c11 (patch) | |
tree | 7d0090d793da95eb66bd240a6ea53d4019f0c6ef | |
parent | 2cd3ba2610eb8c589270752ba2b1f84412ed9a19 (diff) | |
download | scripts-4cc9064951d3b038f18036f9d4e1da562b787c11.tar.gz scripts-4cc9064951d3b038f18036f9d4e1da562b787c11.tar.bz2 scripts-4cc9064951d3b038f18036f9d4e1da562b787c11.zip |
lineage-push: Support pushing from AOSP repo
Change-Id: I13f52355b792f63521c061b64c58ae101d77679c
-rwxr-xr-x | lineage-push/lineage-push.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lineage-push/lineage-push.py b/lineage-push/lineage-push.py index a50f858..425c938 100755 --- a/lineage-push/lineage-push.py +++ b/lineage-push/lineage-push.py @@ -12,6 +12,7 @@ try: except ImportError: from urllib import quote_plus + def push(args): command = 'git push' if args.force: @@ -21,7 +22,11 @@ def push(args): ["git", "config", "review.review.lineageos.org.username"]).decode("utf-8").strip() remotes = subprocess.check_output( ["git", "remote", "-v"]).decode("utf-8").strip() - repo = re.search(r'LineageOS\S+', remotes).group(0) + if "github.com/LineageOS" in remotes: + repo = re.search(r'LineageOS\S+', remotes).group(0) + elif "android.googlesource.com" in remotes: + repo = re.search(r'platform\S+', remotes).group(0) + repo = repo.replace("/", "_").replace("platform", "LineageOS/android") command += ' ssh://{}@review.lineageos.org:29418/{}'.format( username, repo) |