File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 11
11
run (f"jupyter-releaser forwardport-changelog { release_url } " )
12
12
13
13
# Extract the pypi token
14
- twine_pwd = os .environ .get ("PYPI_TOKEN" )
14
+ twine_pwd = os .environ .get ("PYPI_TOKEN" , "" )
15
15
pypi_token_map = os .environ .get ("PYPI_TOKEN_MAP" , "" ).replace (r"\n" , "\n " )
16
16
if pypi_token_map :
17
17
pwd = os .getcwd ()
22
22
if name == repo_name :
23
23
twine_pwd = token
24
24
os .chdir (pwd )
25
- os .environ ["TWINE_PASSWORD" ] = token
25
+ os .environ ["TWINE_PASSWORD" ] = twine_pwd
26
26
27
27
run ("jupyter-releaser publish-assets" )
28
28
run (f"jupyter-releaser publish-release { release_url } " )
Original file line number Diff line number Diff line change @@ -264,13 +264,15 @@ def get_latest_tag(branch):
264
264
def retry (cmd , ** kwargs ):
265
265
"""Run a command with retries"""
266
266
attempt = 0
267
- while attempt < 3 :
267
+ while True :
268
268
time .sleep (attempt )
269
269
try :
270
270
run (cmd , ** kwargs )
271
271
return
272
- except Exception :
272
+ except Exception as e :
273
273
attempt += 1
274
+ if attempt == 3 :
275
+ raise e
274
276
275
277
276
278
def read_config ():
You can’t perform that action at this time.
0 commit comments