Merge branch 'git-submodules-bundlebuilder-try2' of https://github.com/samdroid-apps/sugar-toolkit-gtk3
This commit is contained in:
commit
da65b6db55
@ -172,12 +172,15 @@ class Packager(object):
|
|||||||
if not os.path.exists(self.config.dist_dir):
|
if not os.path.exists(self.config.dist_dir):
|
||||||
os.mkdir(self.config.dist_dir)
|
os.mkdir(self.config.dist_dir)
|
||||||
|
|
||||||
def get_files_in_git(self):
|
def get_files_in_git(self, root=None):
|
||||||
|
if root is None:
|
||||||
|
root = self.config.source_dir
|
||||||
|
|
||||||
git_ls = None
|
git_ls = None
|
||||||
try:
|
try:
|
||||||
git_ls = subprocess.Popen(['git', 'ls-files'],
|
git_ls = subprocess.Popen(['git', 'ls-files'],
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
cwd=self.config.source_dir)
|
cwd=root)
|
||||||
except OSError:
|
except OSError:
|
||||||
logging.warn('Packager: git is not installed, '
|
logging.warn('Packager: git is not installed, '
|
||||||
'fall back to filtered list')
|
'fall back to filtered list')
|
||||||
@ -200,6 +203,13 @@ class Packager(object):
|
|||||||
ignore = True
|
ignore = True
|
||||||
break
|
break
|
||||||
if not ignore:
|
if not ignore:
|
||||||
|
sub_path = os.path.join(root, line)
|
||||||
|
if os.path.isdir(sub_path) \
|
||||||
|
and os.path.isdir(os.path.join(sub_path, '.git')):
|
||||||
|
sub_list = self.get_files_in_git(sub_path)
|
||||||
|
for f in sub_list:
|
||||||
|
files.append(os.path.join(line, f))
|
||||||
|
else:
|
||||||
files.append(line)
|
files.append(line)
|
||||||
|
|
||||||
for pattern in IGNORE_FILES:
|
for pattern in IGNORE_FILES:
|
||||||
|
Loading…
Reference in New Issue
Block a user