Revert "crowdin_sync: Add stable branch sync support"
* No longer needed
This reverts commit 432919aa5aed9fe7de1bf9b4d655a9a837ad71f5.
Change-Id: Ic697d259a0103f29f5183d7f2763879f45d03ccf
diff --git a/README.mkdn b/README.mkdn
index ebb6be1..766cef2 100644
--- a/README.mkdn
+++ b/README.mkdn
@@ -24,21 +24,17 @@
Executing
---------
Export the following environment variables to set the API keys and the base path.
-Base path should contain all LineageOS trees in subfolders, named after LineageOS branches.
-Syncing stable trees requires an additional environment variable plus a 'stable'
-subfolder under the base path, due to crowdin API limitations:
+Base path should contain all LineageOS trees in subfolders, named after LineageOS branches:
export CM_CROWDIN_API_KEY=your_api_key
export CM_AOSP_CROWDIN_API_KEY=your_aosp_api_key
export CM_CROWDIN_BASE_PATH=your_base_path
- export CM_CROWDIN_STABLE_BASE_PATH=your_stable_base_path
Example:
export CM_CROWDIN_API_KEY=1234567890
export CM_AOSP_CROWDIN_API_KEY=0987654321
export CM_CROWDIN_BASE_PATH=/mnt/android/lineageos
- export CM_CROWDIN_STABLE_BASE_PATH=/mnt/android/lineageos/stable
Execute:
diff --git a/crowdin_sync.py b/crowdin_sync.py
index 6295de6..a7dae8b 100755
--- a/crowdin_sync.py
+++ b/crowdin_sync.py
@@ -55,9 +55,6 @@
def push_as_commit(base_path, path, name, branch, username, ticket):
- if 'stable/' in base_path:
- branch = ''.join(('stable/', branch))
-
print('Committing %s on branch %s' % (name, branch))
# Get path
@@ -321,22 +318,16 @@
args = parse_args()
default_branch = args.branch
- if 'stable/' in default_branch:
- base_path_env = 'CM_CROWDIN_STABLE_BASE_PATH'
- base_path = os.getenv(base_path_env)
- default_branch = default_branch.replace('stable/', '')
- else:
- base_path_env = 'CM_CROWDIN_BASE_PATH'
- base_path = os.getenv(base_path_env)
+ base_path = os.getenv('CM_CROWDIN_BASE_PATH')
if base_path is None:
cwd = os.getcwd()
- print('You have not set %s. Defaulting to %s' % (base_path_env, cwd))
+ print('You have not set CM_CROWDIN_BASE_PATH. Defaulting to %s' % cwd)
base_path = cwd
else:
base_path = os.path.join(os.path.realpath(base_path), default_branch)
if not os.path.isdir(base_path):
- print('%s + branch is not a real directory: %s'
- % (base_path_env, base_path))
+ print('CM_CROWDIN_BASE_PATH + branch is not a real directory: %s'
+ % base_path)
sys.exit(1)
if not check_dependencies():