mirror of
https://git.planet-casio.com/Lephenixnoir/GiteaPC.git
synced 2024-12-29 13:03:41 +01:00
Compare commits
No commits in common. "416564d40a13c7f1372adcdf4ed564cc2f72035d" and "36bb5ba31efa049704f33d1c73d58024be61b149" have entirely different histories.
416564d40a
...
36bb5ba31e
2 changed files with 5 additions and 14 deletions
|
@ -79,10 +79,6 @@ def print_repo(r, branches=None, tags=None, has_giteapc=True):
|
|||
print(" ->", os.readlink(r.folder))
|
||||
else:
|
||||
print("")
|
||||
print(" {W}Configs:{_}".format(**colors()), end="")
|
||||
for c in r.configs():
|
||||
print(" " + c, end="")
|
||||
print("")
|
||||
branches = r.branches()
|
||||
tags = r.tags()
|
||||
|
||||
|
|
|
@ -57,11 +57,7 @@ class LocalRepo:
|
|||
self.owner, self.name = fullname.split("/")
|
||||
self.folder = REPO_FOLDER + "/" + fullname
|
||||
self.remote = False
|
||||
|
||||
if os.path.exists(self.folder + "/.giteapc/giteapc.make"):
|
||||
self.makefile = self.folder + "/.giteapc/giteapc.make"
|
||||
else:
|
||||
self.makefile = self.folder + "/giteapc.make"
|
||||
self.makefile = self.folder + "/giteapc.make"
|
||||
|
||||
@staticmethod
|
||||
def path(fullname):
|
||||
|
@ -163,17 +159,16 @@ class LocalRepo:
|
|||
command = "make"
|
||||
|
||||
with ChangeDirectory(self.folder):
|
||||
return run([command, "-f", self.makefile, target], env=env)
|
||||
return run([command, "-f", "giteapc.make", target], env=env)
|
||||
|
||||
def configs(self):
|
||||
RE_NAME = re.compile(r'giteapc-config-(.*)\.make')
|
||||
files = glob.glob(self.folder + "/giteapc-config-*.make")
|
||||
files += glob.glob(self.folder + "/.giteapc/giteapc-config-*.make")
|
||||
return sorted(RE_NAME.match(os.path.basename(x))[1] for x in files)
|
||||
|
||||
def set_config(self, config):
|
||||
source = os.path.dirname(self.makefile) + f"/giteapc-config.make"
|
||||
target = os.path.dirname(self.makefile) + f"/giteapc-config-{config}.make"
|
||||
source = self.folder + f"/giteapc-config.make"
|
||||
target = self.folder + f"/giteapc-config-{config}.make"
|
||||
|
||||
if config == "":
|
||||
if os.path.islink(source):
|
||||
|
@ -196,7 +191,7 @@ class LocalRepo:
|
|||
RE_METADATA = re.compile(r'^\s*#\s*giteapc\s*:\s*(.*)$')
|
||||
metadata = dict()
|
||||
|
||||
with open(self.makefile, "r") as fp:
|
||||
with open(self.folder + "/giteapc.make", "r") as fp:
|
||||
makefile = fp.read()
|
||||
|
||||
for line in makefile.split("\n"):
|
||||
|
|
Loading…
Reference in a new issue