forked from semios/semios-packages
feat: use packie new links format
Signed-off-by: sisungo <[email protected]>
This commit is contained in:
+7
-1
@@ -23,7 +23,13 @@ class PkgComposer:
|
||||
|
||||
def write_manifest(self, manifest: dict):
|
||||
with open(self.workdir + "/PkgManifest.json", "w") as f:
|
||||
json.dump(manifest, f, indent=4)
|
||||
json.dump(manifest, f)
|
||||
|
||||
def write_links(self, links: list[dict]):
|
||||
with open(self.workdir + "/_links", "w") as f:
|
||||
for link in links:
|
||||
json.dump(link, f)
|
||||
f.write("\n")
|
||||
|
||||
def compose(self):
|
||||
shutil.make_archive(self.pkgfile, _archive_format, self.workdir)
|
||||
|
||||
@@ -107,11 +107,11 @@ def run_build_package(package: str):
|
||||
"name": pkgname,
|
||||
"version": pkgver,
|
||||
"arch": pkgarch,
|
||||
"links": pkginfo[lib.make._key_links],
|
||||
"dependencies": pkginfo[lib.make._key_dependencies],
|
||||
"provides": pkginfo[lib.make._key_provides],
|
||||
}
|
||||
composer.write_manifest(manifest)
|
||||
composer.write_links(pkginfo[lib.make._key_links])
|
||||
composer.compose()
|
||||
|
||||
# Build success
|
||||
|
||||
Reference in New Issue
Block a user