diff --git a/script/ci-release-build.js b/script/ci-release-build.js index 8da29b3eacc4..cf4a2c609a1a 100644 --- a/script/ci-release-build.js +++ b/script/ci-release-build.js @@ -21,7 +21,6 @@ const ciJob = args._[0] assert(ciJobs.includes(ciJob), `Unknown ci job name: ${ciJob}.`) assert(process.env.CIRCLE_TOKEN, 'CIRCLE_TOKEN not found in environment') - const circleBuildURL = `https://circleci.com/api/v1.1/project/github/electron/electron/tree/${targetBranch}?circle-token=${process.env.CIRCLE_TOKEN}` console.log(`Triggering CircleCI to run build job: ${ciJob} against branch: ${targetBranch} with release flag.`) @@ -40,7 +39,7 @@ request({ } }) }, (err, res, body) => { - if (!err && res.statusCode == 200) { + if (!err && body) { const build = JSON.parse(body) console.log(`check ${build.build_url} for status`) } else { diff --git a/script/upload.py b/script/upload.py index eb6a4409f53f..1d8525365874 100755 --- a/script/upload.py +++ b/script/upload.py @@ -64,26 +64,34 @@ def main(): tag_exists) # Upload Electron with GitHub Releases API. - upload_electron(github, release, os.path.join(DIST_DIR, DIST_NAME), args.upload_to_s3) - upload_electron(github, release, os.path.join(DIST_DIR, SYMBOLS_NAME), args.upload_to_s3) + upload_electron(github, release, os.path.join(DIST_DIR, DIST_NAME), + args.upload_to_s3) + upload_electron(github, release, os.path.join(DIST_DIR, SYMBOLS_NAME), + args.upload_to_s3) if PLATFORM == 'darwin': - upload_electron(github, release, os.path.join(DIST_DIR, args.upload_to_s3, - 'electron-api.json')) - upload_electron(github, release, os.path.join(DIST_DIR, 'electron.d.ts'), args.upload_to_s3) - upload_electron(github, release, os.path.join(DIST_DIR, DSYM_NAME), args.upload_to_s3) + upload_electron(github, release, os.path.join(DIST_DIR, + 'electron-api.json'), args.upload_to_s3) + upload_electron(github, release, os.path.join(DIST_DIR, 'electron.d.ts'), + args.upload_to_s3) + upload_electron(github, release, os.path.join(DIST_DIR, DSYM_NAME), + args.upload_to_s3) elif PLATFORM == 'win32': - upload_electron(github, release, os.path.join(DIST_DIR, PDB_NAME), args.upload_to_s3) + upload_electron(github, release, os.path.join(DIST_DIR, PDB_NAME), + args.upload_to_s3) # Upload free version of ffmpeg. ffmpeg = get_zip_name('ffmpeg', ELECTRON_VERSION) - upload_electron(github, release, os.path.join(DIST_DIR, ffmpeg), args.upload_to_s3) + upload_electron(github, release, os.path.join(DIST_DIR, ffmpeg), + args.upload_to_s3) # Upload chromedriver and mksnapshot for minor version update. if parse_version(args.version)[2] == '0': chromedriver = get_zip_name('chromedriver', ELECTRON_VERSION) - upload_electron(github, release, os.path.join(DIST_DIR, chromedriver), args.upload_to_s3) + upload_electron(github, release, os.path.join(DIST_DIR, chromedriver), + args.upload_to_s3) mksnapshot = get_zip_name('mksnapshot', ELECTRON_VERSION) - upload_electron(github, release, os.path.join(DIST_DIR, mksnapshot), args.upload_to_s3) + upload_electron(github, release, os.path.join(DIST_DIR, mksnapshot), + args.upload_to_s3) # TODO: make s3 compatible @@ -222,7 +230,7 @@ def upload_electron(github, release, file_path, upload_to_s3): arm_filename = filename.replace('armv7l', 'arm') arm_file_path = os.path.join(os.path.dirname(file_path), arm_filename) shutil.copy2(file_path, arm_file_path) - upload_electron(github, release, arm_file_path) + upload_electron(github, release, arm_file_path, upload_to_s3) def upload_io_to_github(release, filename, filepath):