????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 18.117.246.69 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/lib/node_modules/npm/node_modules/node-gyp/ |
Upload File : |
#!/usr/bin/env python3 import argparse import os import shutil import subprocess import sys import tarfile import tempfile import urllib.request BASE_URL = "https://github.com/nodejs/gyp-next/archive/" CHECKOUT_PATH = os.path.dirname(os.path.realpath(__file__)) CHECKOUT_GYP_PATH = os.path.join(CHECKOUT_PATH, 'gyp') parser = argparse.ArgumentParser() parser.add_argument("tag", help="gyp tag to update to") args = parser.parse_args() tar_url = BASE_URL + args.tag + ".tar.gz" changed_files = subprocess.check_output(["git", "diff", "--name-only"]).strip() if changed_files: raise Exception("Can't update gyp while you have uncommitted changes in node-gyp") with tempfile.TemporaryDirectory() as tmp_dir: tar_file = os.path.join(tmp_dir, 'gyp.tar.gz') unzip_target = os.path.join(tmp_dir, 'gyp') with open(tar_file, 'wb') as f: print("Downloading gyp-next@" + args.tag + " into temporary directory...") print("From: " + tar_url) with urllib.request.urlopen(tar_url) as in_file: f.write(in_file.read()) print("Unzipping...") with tarfile.open(tar_file, "r:gz") as tar_ref: tar_ref.extractall(unzip_target) 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) subprocess.check_output(["git", "add", "gyp"], cwd=CHECKOUT_PATH) subprocess.check_output(["git", "commit", "-m", "gyp: update gyp to " + args.tag])