new insructions
All checks were successful
Potlatch Loggers Organization/ComputerKeeper/pipeline/head This commit looks good

This commit is contained in:
Joe Stanley 2022-11-06 20:10:42 -08:00
parent 5eb7303247
commit 6966d7572c

View File

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