Skip to content

Commit 4c7c7c5

Browse files
committed
Publish Fixes
1 parent 9dc1f5f commit 4c7c7c5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

jupyter_releaser/actions/publish_release.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
run(f"jupyter-releaser forwardport-changelog {release_url}")
1212

1313
# Extract the pypi token
14-
twine_pwd = os.environ.get("PYPI_TOKEN")
14+
twine_pwd = os.environ.get("PYPI_TOKEN", "")
1515
pypi_token_map = os.environ.get("PYPI_TOKEN_MAP", "").replace(r"\n", "\n")
1616
if pypi_token_map:
1717
pwd = os.getcwd()
@@ -22,7 +22,7 @@
2222
if name == repo_name:
2323
twine_pwd = token
2424
os.chdir(pwd)
25-
os.environ["TWINE_PASSWORD"] = token
25+
os.environ["TWINE_PASSWORD"] = twine_pwd
2626

2727
run("jupyter-releaser publish-assets")
2828
run(f"jupyter-releaser publish-release {release_url}")

jupyter_releaser/util.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,15 @@ def get_latest_tag(branch):
264264
def retry(cmd, **kwargs):
265265
"""Run a command with retries"""
266266
attempt = 0
267-
while attempt < 3:
267+
while True:
268268
time.sleep(attempt)
269269
try:
270270
run(cmd, **kwargs)
271271
return
272-
except Exception:
272+
except Exception as e:
273273
attempt += 1
274+
if attempt == 3:
275+
raise e
274276

275277

276278
def read_config():

0 commit comments

Comments
 (0)