From 993ad39c2da59043a346584762363328d13b6cd8 Mon Sep 17 00:00:00 2001 From: Ave Ozkal Date: Fri, 25 Jan 2019 16:23:07 +0300 Subject: [PATCH] branding: have counters by branch --- patches/branding/addpatch.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/patches/branding/addpatch.py b/patches/branding/addpatch.py index 7c898e84..3964e549 100644 --- a/patches/branding/addpatch.py +++ b/patches/branding/addpatch.py @@ -6,9 +6,9 @@ fname = sys.argv[1] persistdir = "/home/ave/distokrepos/versionlogs/" -def counterup(): +def counterup(branch="base"): # HACKY - cfname = persistdir + fname.split("/")[-1].replace(".patch", "") + cfname = persistdir + fname.split("/")[-1].replace(".patch", "") + branch if os.path.isfile(cfname): with open(cfname, 'r') as file: countdata = file.read() @@ -27,8 +27,6 @@ def counterup(): with open(fname, 'r') as file: filedata = file.read() -buildnum = str(counterup()) - name = "CutTheCord" branch = "base" @@ -36,6 +34,8 @@ if "customtheme" in sys.argv: branch = "themed" # name += " Themed" +buildnum = str(counterup(branch)) + # Replace the target string filedata = filedata.replace("CTCBRANCH", branch)\ .replace("CTCBUILD", buildnum)\