1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Migrate translations upload (#33926)

* Migrate translations upload

* Fix token in download command

* Minor cleanup
This commit is contained in:
Paulus Schoutsen
2020-04-09 17:52:33 -07:00
committed by GitHub
parent 2edfa82237
commit e9c412bac6
8 changed files with 100 additions and 154 deletions

View File

@@ -1,6 +1,7 @@
"""Translation utils."""
import os
import pathlib
import subprocess
from .error import ExitApp
@@ -20,3 +21,14 @@ def get_lokalise_token():
)
return token_file.read_text().strip()
def get_current_branch():
"""Get current branch."""
return (
subprocess.run(
["git", "rev-parse", "--abbrev-ref", "HEAD"], stdout=subprocess.PIPE
)
.stdout.decode()
.strip()
)