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()