Add --files-only flag to addpkg and delpkg
This commit is contained in:
parent
a36ed7e2bc
commit
f576032dae
@ -66,6 +66,11 @@ if __name__ == "__main__":
|
|||||||
"--db-filename",
|
"--db-filename",
|
||||||
help="alternative filename for database without extension",
|
help="alternative filename for database without extension",
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--files-only",
|
||||||
|
action="store_true",
|
||||||
|
help="only add the built files to the repository",
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-s",
|
"-s",
|
||||||
"--sign",
|
"--sign",
|
||||||
@ -118,6 +123,7 @@ if __name__ == "__main__":
|
|||||||
syslog.critical("No package tarballs have been found, exiting")
|
syslog.critical("No package tarballs have been found, exiting")
|
||||||
exit(E_NOFILESERR)
|
exit(E_NOFILESERR)
|
||||||
|
|
||||||
|
if not args.files_only:
|
||||||
try:
|
try:
|
||||||
repos.db_modify("add", db, *opts, *pkg_tarballs)
|
repos.db_modify("add", db, *opts, *pkg_tarballs)
|
||||||
except repos.RepoAddError as e:
|
except repos.RepoAddError as e:
|
||||||
|
@ -61,6 +61,11 @@ if __name__ == "__main__":
|
|||||||
"--db-filename",
|
"--db-filename",
|
||||||
help="alternative filename for database without extension",
|
help="alternative filename for database without extension",
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--files-only",
|
||||||
|
action="store_true",
|
||||||
|
help="only add the built files to the repository",
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-s",
|
"-s",
|
||||||
"--sign",
|
"--sign",
|
||||||
@ -111,6 +116,7 @@ if __name__ == "__main__":
|
|||||||
for pkgfile in (*pkg_tarballs, *sigfiles):
|
for pkgfile in (*pkg_tarballs, *sigfiles):
|
||||||
del_pkgfile(pkgfile)
|
del_pkgfile(pkgfile)
|
||||||
|
|
||||||
|
if not args.files_only:
|
||||||
try:
|
try:
|
||||||
repos.db_modify("remove", db, *opts, *pkgs)
|
repos.db_modify("remove", db, *opts, *pkgs)
|
||||||
except repos.RepoAddError as e:
|
except repos.RepoAddError as e:
|
||||||
|
2
setup.py
2
setup.py
@ -5,7 +5,7 @@ with open("README.rst", "r") as fh:
|
|||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name="packaging_scripts",
|
name="packaging_scripts",
|
||||||
version="1.1.5",
|
version="1.1.6",
|
||||||
author="Eric Russel Torres",
|
author="Eric Russel Torres",
|
||||||
author_email="erictorres4@protonmail.com",
|
author_email="erictorres4@protonmail.com",
|
||||||
description="A set of helpers for automating borg interaction",
|
description="A set of helpers for automating borg interaction",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user