Skip to content

Commit

Permalink
better flow for bootsrap ci download process
Browse files Browse the repository at this point in the history
  • Loading branch information
dvtkrlbs committed Jun 29, 2023
1 parent 22b2ba3 commit 0f0113f
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -1156,25 +1156,21 @@ def bootstrap(args):

try:
last_commit = build.last_bootstrap_commit()
if not bootstrap_bin.exists and not build.bootstrap_out_of_date(last_commit):
success = build.download_bootstrap(last_commit)

if success:
stamp = pathlib.Path(build.build_dir).joinpath("bootstrap/.bootstrap-stamp")
stamp.write_text(last_commit)
build.is_precompiled_bootstrap = True

else:
if last_commit is None:
build.build_bootstrap()
else:
if build.bootstrap_out_of_date(last_commit):
success = build.download_bootstrap(last_commit)
if success:
stamp = pathlib.Path(build.build_dir).joinpath("bootstrap/.bootstrap-stamp")
stamp.write_text(last_commit)
build.is_precompiled_bootstrap = True
else:
build.build_bootstrap()

except Exception as e:
import traceback
print(traceback.format_exc())
print(str(e))

if not build.is_precompiled_bootstrap:
build.build_bootstrap()


sys.stdout.flush()

Expand Down

0 comments on commit 0f0113f

Please sign in to comment.