Write repo.json to current working directory
This commit is contained in:
@@ -140,7 +140,10 @@ def make_repo(repopath: pathlib.Path):
|
|||||||
|
|
||||||
repo_data['packages'] = package_data
|
repo_data['packages'] = package_data
|
||||||
|
|
||||||
dump_repo(repopath, repo_data)
|
log.info("Repository generation successful")
|
||||||
|
cwd = pathlib.Path.cwd()
|
||||||
|
dump_repo(cwd, repo_data)
|
||||||
|
log.info("repo.json written to %s" % cwd)
|
||||||
|
|
||||||
def dump_repo(repo_path: pathlib.Path, repo_data: dict):
|
def dump_repo(repo_path: pathlib.Path, repo_data: dict):
|
||||||
with (repo_path / 'repo.json').open('w', encoding='utf-8') as repo_file:
|
with (repo_path / 'repo.json').open('w', encoding='utf-8') as repo_file:
|
||||||
|
@@ -29,7 +29,7 @@ class test_blenderpack_make_repo(unittest.TestCase):
|
|||||||
|
|
||||||
def test_make_repo_valid(self):
|
def test_make_repo_valid(self):
|
||||||
blenderpack.make_repo(self.helper_path / 'addons')
|
blenderpack.make_repo(self.helper_path / 'addons')
|
||||||
repojson = self.helper_path / 'addons' / 'repo.json'
|
repojson = Path.cwd() / 'repo.json'
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with repojson.open('r') as f:
|
with repojson.open('r') as f:
|
||||||
|
Reference in New Issue
Block a user