@@ -42,6 +42,7 @@ def is_existing_tag(tag: str) -> bool:
4242 f""".[] | select(.name | contains("{ tag .strip ()} "))"""
4343 ],
4444 shell = False ,
45+ check = False , # this subprocess is allowed to fail
4546 capture_output = True
4647 )
4748 return res .stdout .decode () != ""
@@ -130,6 +131,7 @@ def get_tag_date(tag: str) -> str:
130131 "--json=createdAt"
131132 ],
132133 shell = False ,
134+ check = True ,
133135 capture_output = True
134136 )
135137 res = json .loads (res .stdout .decode ())
@@ -300,15 +302,15 @@ def main(new_version: str) -> None:
300302 "git" ,
301303 "merge-base" ,
302304 basetag ,
303- "master "
304- ], shell = False , capture_output = True ).stdout .decode ().strip ()
305+ "HEAD "
306+ ], shell = False , check = True , capture_output = True ).stdout .decode ().strip ()
305307 timestamp = subprocess .run ([
306308 "git" ,
307309 "show" ,
308310 "-s" ,
309311 "--format=\" %cI\" " ,
310312 shared_commit
311- ], shell = False , capture_output = True ).stdout .decode ().strip ().replace ('"' , '' )
313+ ], shell = False , check = True , capture_output = True ).stdout .decode ().strip ().replace ('"' , '' )
312314 # date is first 10 characters of timestamp
313315 startdate = timestamp [0 :10 ]
314316 print ("Base tag is" , basetag )
@@ -338,6 +340,7 @@ def main(new_version: str) -> None:
338340 ".[] | select(.isLatest == true)"
339341 ],
340342 shell = False ,
343+ check = True ,
341344 capture_output = True
342345 )
343346 itag = json .loads (itag .stdout .decode ())["name" ][1 :]
0 commit comments