Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass cert and password parameters to hammer-brave.bat #14

Merged
merged 3 commits into from Nov 5, 2018
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -19,7 +19,17 @@ def FetchThirdParties(args, omaha_dir):
def Build(args, omaha_dir):
# move to omaha/omaha and start build.
os.chdir(os.path.join(omaha_dir, 'omaha'))
command = ['hammer-brave.bat', 'MODE=all', '--all']

# set signing environment variables
key_pfx_path = os.environ.get('KEY_PFX_PATH', '')
key_cer_path = os.environ.get('KEY_CER_PATH', '')
authenticode_password = os.environ.get('AUTHENTICODE_PASSWORD', '')

command = ['hammer-brave.bat', 'MODE=all', '--all', '--sha2_authenticode_file=' + key_pfx_path,
'--sha2_authenticode_password=' + authenticode_password, '--sha1_authenticode_file=' + key_pfx_path,
'--sha1_authenticode_password=' + authenticode_password, '--patching_certificate=' + key_cer_path,
'--authenticode_file=' + key_pfx_path, '--authenticode_password=' + authenticode_password]

sp.check_call(command, stderr=sp.STDOUT)

def PrepareStandalone(args, omaha_dir):
@@ -61,7 +71,11 @@ def Tagging(args, omaha_dir, debug):
omaha_out_dir = os.path.join(omaha_dir, 'omaha', 'scons-out', last_win_dir)
apply_tag_exe = os.path.join(omaha_out_dir, 'obj', 'tools', 'ApplyTag', 'ApplyTag.exe')

tag = 'appguid=APP_GUID&appname=TAG_APP_NAME&needsadmin=prefers&lang=en&ap=TAG_AP'
# the needsadmin flag defaults to 'prefers', which should be used for normal installers,
# only the migration installer for browser-laptop to brave-core should use 'False'
tag_admin = os.environ.get('TAG_ADMIN', 'prefers')
tag = 'appguid=APP_GUID&appname=TAG_APP_NAME&needsadmin=TAG_ADMIN&lang=en&ap=TAG_AP'
tag = tag.replace("TAG_ADMIN", tag_admin)
tag = tag.replace("APP_GUID", args.guid[0])
tag = tag.replace("TAG_APP_NAME", args.tag_app_name[0])
tag = tag.replace("TAG_AP", args.tag_ap[0])
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.