Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions update-gyp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import subprocess
import tarfile
import tempfile
import time
import urllib.request

BASE_URL = "https://github.com/nodejs/gyp-next/archive/"
Expand Down Expand Up @@ -56,13 +57,15 @@ def safe_extract(tar, path=".", members=None, *, numeric_owner=False):
tar.extractall(path, members, numeric_owner=numeric_owner)

safe_extract(tar_ref, unzip_target)
time.sleep(1)

print("Moving to current checkout (" + CHECKOUT_PATH + ")...")
if os.path.exists(CHECKOUT_GYP_PATH):
shutil.rmtree(CHECKOUT_GYP_PATH)
shutil.move(
os.path.join(unzip_target, os.listdir(unzip_target)[0]), CHECKOUT_GYP_PATH
)
time.sleep(1) # https://github.com/nodejs/node-gyp/issues/3165

if not args.no_commit:
subprocess.check_output(["git", "add", "gyp"], cwd=CHECKOUT_PATH)
Expand Down
Loading