From 6966d7572c9894255e689b5c4be71ce567d39323 Mon Sep 17 00:00:00 2001 From: Joe Stanley Date: Sun, 6 Nov 2022 20:10:42 -0800 Subject: [PATCH] new insructions --- publish_package.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/publish_package.py b/publish_package.py index b8038d7..52e6c2d 100644 --- a/publish_package.py +++ b/publish_package.py @@ -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()