forked from distok/cutthecord
ctcci: commit some stuff I forgot to commit
This commit is contained in:
parent
8f698e4899
commit
56f451009d
2 changed files with 13 additions and 6 deletions
|
@ -33,9 +33,14 @@ if os.path.exists(WORK_APK_PATH):
|
||||||
|
|
||||||
os.makedirs(WORK_FOLDER, exist_ok=True)
|
os.makedirs(WORK_FOLDER, exist_ok=True)
|
||||||
|
|
||||||
|
if LOCAL_STATE:
|
||||||
# Get the version of the APK from distok state file
|
# Get the version of the APK from distok state file
|
||||||
with open(STATE_FILE) as f:
|
with open(STATE_FILE) as f:
|
||||||
STATE = json.load(f)
|
STATE = json.load(f)
|
||||||
|
else:
|
||||||
|
# Get the version of the APK from distok.top
|
||||||
|
STATE = requests.get("https://distok.top/state.json").json()
|
||||||
|
|
||||||
VERSION = STATE["android"][PACKAGE_ID]["version"]
|
VERSION = STATE["android"][PACKAGE_ID]["version"]
|
||||||
|
|
||||||
BASE_APK_PATH = os.path.join(WORK_FOLDER, f"discord-base-{VERSION}")
|
BASE_APK_PATH = os.path.join(WORK_FOLDER, f"discord-base-{VERSION}")
|
||||||
|
@ -60,6 +65,7 @@ if not FORCE and os.path.exists(OUTPUT_FILE):
|
||||||
print("This version is already patched, bye!")
|
print("This version is already patched, bye!")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
if DO_GITPULL:
|
||||||
# Update cutthecord
|
# Update cutthecord
|
||||||
subprocess.run("git pull", shell=True, cwd=REPO_FOLDER)
|
subprocess.run("git pull", shell=True, cwd=REPO_FOLDER)
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ FDROID_FOLDER = "/var/www/fdroid/seabear"
|
||||||
RESULT_FOLDER = FDROID_FOLDER + "/repo"
|
RESULT_FOLDER = FDROID_FOLDER + "/repo"
|
||||||
|
|
||||||
# Repo for CutTheCord (https://gitdab.com/distok/cutthecord)
|
# Repo for CutTheCord (https://gitdab.com/distok/cutthecord)
|
||||||
|
DO_GITPULL = True
|
||||||
REPO_FOLDER = "/home/ave/distokrepos/cutthecord"
|
REPO_FOLDER = "/home/ave/distokrepos/cutthecord"
|
||||||
|
|
||||||
# Keystore file, alias and pass. Required.
|
# Keystore file, alias and pass. Required.
|
||||||
|
|
Loading…
Reference in a new issue