]> khamidou — GitHub mirrors - electron.git/commitdiff
s3_config should be in lib.config
authorCheng Zhao <zcbenz@gmail.com>
Sun, 12 Apr 2015 04:00:02 +0000 (12:00 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sun, 12 Apr 2015 04:00:02 +0000 (12:00 +0800)
script/lib/config.py
script/lib/util.py
script/upload-checksums.py
script/upload-index-json.py
script/upload-node-headers.py
script/upload-windows-pdb.py

index a45822aa1727bcbbed6a2e2968890ee652c385a1..7fb314ac9a27fcfd38fa1db9d15e62440b4afac4 100644 (file)
@@ -47,6 +47,17 @@ def get_target_arch():
     return 'x64'
 
 
+def s3_config():
+  config = (os.environ.get('ATOM_SHELL_S3_BUCKET', ''),
+            os.environ.get('ATOM_SHELL_S3_ACCESS_KEY', ''),
+            os.environ.get('ATOM_SHELL_S3_SECRET_KEY', ''))
+  message = ('Error: Please set the $ATOM_SHELL_S3_BUCKET, '
+             '$ATOM_SHELL_S3_ACCESS_KEY, and '
+             '$ATOM_SHELL_S3_SECRET_KEY environment variables')
+  assert all(len(c) for c in config), message
+  return config
+
+
 def enable_verbose_mode():
   print 'Running in verbose mode'
   global verbose_mode
index 698da95080a43f39b11ab7a39b549b0e271bf2a4..88641589859137ce00fbf8b977e7891bf7410c40 100644 (file)
@@ -176,17 +176,6 @@ def parse_version(version):
     return vs + ['0'] * (4 - len(vs))
 
 
-def s3_config():
-  config = (os.environ.get('ATOM_SHELL_S3_BUCKET', ''),
-            os.environ.get('ATOM_SHELL_S3_ACCESS_KEY', ''),
-            os.environ.get('ATOM_SHELL_S3_SECRET_KEY', ''))
-  message = ('Error: Please set the $ATOM_SHELL_S3_BUCKET, '
-             '$ATOM_SHELL_S3_ACCESS_KEY, and '
-             '$ATOM_SHELL_S3_SECRET_KEY environment variables')
-  assert all(len(c) for c in config), message
-  return config
-
-
 def s3put(bucket, access_key, secret_key, prefix, key_prefix, files):
   args = [
     's3put',
index b0378d834bc7878fca5aa51ba26d40a42663775d..19b6643c6d92f7c28a604716079e68f492de1f6b 100755 (executable)
@@ -5,7 +5,8 @@ import hashlib
 import os
 import tempfile
 
-from lib.util import download, rm_rf, s3_config, s3put
+from lib.config import s3_config
+from lib.util import download, rm_rf, s3put
 
 
 DIST_URL = 'https://atom.io/download/atom-shell/'
index 52f441b70194c3903cfa84f8c76230fc5548bae4..6bec55f2a98a43303e62f0b6faf1171b49047346 100755 (executable)
@@ -3,8 +3,8 @@
 import os
 import sys
 
-from lib.config import PLATFORM
-from lib.util import execute, s3_config, s3put, scoped_cwd
+from lib.config import PLATFORM, s3_config
+from lib.util import execute, s3put, scoped_cwd
 
 
 SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
index 136da07d938ba86a4a2446fbf006286719ddccbe..86335b2b63db1d85a3479000bdea7c98aacae27c 100755 (executable)
@@ -7,8 +7,8 @@ import shutil
 import sys
 import tarfile
 
-from lib.config import PLATFORM, get_target_arch
-from lib.util import execute, safe_mkdir, scoped_cwd, s3_config, s3put
+from lib.config import PLATFORM, get_target_arch, s3_config
+from lib.util import execute, safe_mkdir, scoped_cwd, s3put
 
 
 SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
index b76fb7a099344aa144d78677fe96c8b4d8a64717..71c0c672dbe929b66819cbd63acc5bcce246f880 100755 (executable)
@@ -3,7 +3,8 @@
 import os
 import glob
 
-from lib.util import execute, rm_rf, safe_mkdir, s3put, s3_config
+from lib.config import s3_config
+from lib.util import execute, rm_rf, safe_mkdir, s3put
 
 
 SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))