mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
fixup! build.cmds.CmdListRepos: Support local repos
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
f6c3f49fca
commit
c37e180e00
2 changed files with 4 additions and 7 deletions
|
|
@ -35,7 +35,7 @@ build = realpath
|
||||||
build = realpath
|
build = realpath
|
||||||
|
|
||||||
[pkg.requires.suse]
|
[pkg.requires.suse]
|
||||||
run = python3, python3-GitPython
|
run = python3
|
||||||
release = rpmbuild, pkg-config, python3-base
|
release = rpmbuild, pkg-config, python3-base
|
||||||
|
|
||||||
[pkg.requires.debian]
|
[pkg.requires.debian]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import re, git, os
|
import re, os
|
||||||
from argparse import Namespace, ArgumentParser
|
from argparse import Namespace, ArgumentParser
|
||||||
|
|
||||||
from ..Cmd import Cmd
|
from ..Cmd import Cmd
|
||||||
|
|
@ -79,11 +79,8 @@ class CmdListRepos(Cmd): # export
|
||||||
out = []
|
out = []
|
||||||
for entry in os.scandir(args.base_url + "/" + subdir):
|
for entry in os.scandir(args.base_url + "/" + subdir):
|
||||||
path = entry.path
|
path = entry.path
|
||||||
try:
|
if os.path.isdir(path + "/.git") or os.path.exists(path + "/HEAD"):
|
||||||
_ = git.Repo(path).git_dir
|
out.append(path)
|
||||||
except:
|
|
||||||
continue
|
|
||||||
out.append(path)
|
|
||||||
if out:
|
if out:
|
||||||
print('\n'.join(out))
|
print('\n'.join(out))
|
||||||
break
|
break
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue