Skip to content

Commit

Permalink
Fix macOS builds
Browse files Browse the repository at this point in the history
- Add extra logging to upload.py
- Don't upload via electron-builder
- update logging in cibuild for run_script (print details about error that happened)

Auditors: @petemill
  • Loading branch information
bsclifton committed Feb 27, 2018
1 parent 5efdd96 commit d1182b1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tools/buildInstaller.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ if (isDarwin) {
'cd ..',
'build ' +
`--prepackaged="${buildDir}/${appName}.app" ` +
`--config=res/${channel}/builderConfig.json `,
`--config=res/${channel}/builderConfig.json ` +
'--publish=never',

// Create an update zip
'ditto -c -k --sequesterRsrc --keepParent ' + buildDir + `/${appName}.app dist/${appName}-` + VersionInfo.braveVersion + '.zip'
Expand Down
7 changes: 6 additions & 1 deletion tools/cibuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ def run_script(script, args=[]):
sys.stderr.write('\nRunning ' + script +'\n')
sys.stderr.flush()
script = os.path.join(SOURCE_ROOT, 'tools', script)
subprocess.check_call([sys.executable, script] + args)
try:
output = subprocess.check_output([sys.executable, script] + args, stderr=subprocess.STDOUT)
print output
except subprocess.CalledProcessError as e:
print e.output
raise e


PLATFORM = {
Expand Down
4 changes: 3 additions & 1 deletion tools/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
TARGET_ARCH= os.environ['TARGET_ARCH'] if os.environ.has_key('TARGET_ARCH') else 'x64'

def main():
print('Running upload...')
github = GitHub(auth_token())
releases = github.repos(BROWSER_LAPTOP_REPO).releases.get()
tag = 'v' + json.load(open('package.json'))['version']
Expand All @@ -20,7 +21,7 @@ def main():
release = create_or_get_release_draft(github, releases, tag,
tag_exists)
for f in get_files_to_upload():
upload_browser_laptop(github,release, f)
upload_browser_laptop(github, release, f)

def get_channel_display_name():
d = {'dev': 'Release', 'beta': 'Beta', 'developer': 'Developer', 'nightly': 'Nightly'}
Expand All @@ -36,6 +37,7 @@ def get_files_to_upload():

def upload_browser_laptop(github, release, file_path):
filename = os.path.basename(file_path)
print('upload_browser_laptop: ' + filename)
try:
for asset in release['assets']:
if asset['name'] == filename:
Expand Down

0 comments on commit d1182b1

Please sign in to comment.