dev/add-package-publisher #16

Merged
joshb merged 6 commits from dev/add-package-publisher into main 2022-11-11 01:29:24 +00:00
Showing only changes of commit 6966d7572c - Show all commits

View File

@ -23,17 +23,21 @@ def main():
s.auth = (AUTH_USER, AUTH_PASS)
# Delete Package
try:
s.delete(
print("Deleting...")
result = s.delete(
f"{HOST}/api/packages/{OWNER}/generic/{PKG_NAME}/{PKG_VERSION}"
)
result.raise_for_status()
except Exception:
# Intentionally Overlook Issues Here
pass
print("No package to delete.")
# Add New Package
s.put(
print("Adding new package...")
result = s.put(
(
f"{HOST}/api/packages/{OWNER}/generic/{PKG_NAME}/{PKG_VERSION}/" +
FILE_NAME
),
data=open(f"dist/{FILE_NAME}", 'rb').read(),
)
result.raise_for_status()