From d0691dffdfbc7470e4c3e1c9e13994d7940d4d69 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Thu, 27 Sep 2018 17:30:35 +1000 Subject: [PATCH] chore: remove serve-node-headers.py, unused in new testing setup and points at old out_dir --- script/serve-node-headers.py | 56 ------------------------------------ 1 file changed, 56 deletions(-) delete mode 100755 script/serve-node-headers.py diff --git a/script/serve-node-headers.py b/script/serve-node-headers.py deleted file mode 100755 index 2d71a1a4881c..000000000000 --- a/script/serve-node-headers.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env python - -import argparse -import atexit -import os -import shutil -import sys -import tarfile -import time - -from subprocess import Popen, PIPE -from lib.util import execute_stdout - -SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) -DIST_DIR = os.path.join(SOURCE_ROOT, 'dist') - - -def main(): - args = parse_args() - header_dir = os.path.join(DIST_DIR, args.version) - - # Generate Headers - script_path = os.path.join(SOURCE_ROOT, 'script', 'create-node-headers.py') - execute_stdout([sys.executable, script_path, '--version', args.version, - '--directory', header_dir]) - - # Launch server - script_path = os.path.join(SOURCE_ROOT, 'node_modules', 'serve', 'bin', - 'serve.js') - server = Popen(['node', script_path, '--port=' + args.port], stdout=PIPE, - cwd=DIST_DIR) - def cleanup(): - server.kill() - atexit.register(cleanup) - - time.sleep(1) - - # Generate Checksums - script_path = os.path.join(SOURCE_ROOT, 'script', 'upload-node-checksums.py') - execute_stdout([sys.executable, script_path, '--version', args.version, - '--dist-url', 'http://localhost:' + args.port, - '--target-dir', header_dir]) - - print("Point your npm config at 'http://localhost:" + args.port + "'") - server.wait() - -def parse_args(): - parser = argparse.ArgumentParser(description='create node header tarballs') - parser.add_argument('-v', '--version', help='Specify the version', - required=True) - parser.add_argument('-p', '--port', help='Specify port to run local server', - default='4321') - return parser.parse_args() - -if __name__ == '__main__': - sys.exit(main())