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 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Pass cert and password parameters to hammer-brave.bat

  • Loading branch information
mbacchi committed Nov 5, 2018
commit 66d9392288200cfd52dabfc63a21667a90326b14
@@ -20,6 +20,17 @@ 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']

This comment has been minimized.

Copy link
@simonhong

simonhong Nov 5, 2018

Collaborator

nit: This line can be deleted.

This comment has been minimized.

Copy link
@mbacchi

mbacchi Nov 5, 2018

Author Member

Removed. An oversight on my part.


# 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 +72,9 @@ 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'
# right now the needsadmin flag is hardcoded, but should be configurable with an env var or command line flag
tag = 'appguid=APP_GUID&appname=TAG_APP_NAME&needsadmin=False&lang=en&ap=TAG_AP'

This comment has been minimized.

Copy link
@simonhong

simonhong Nov 5, 2018

Collaborator

Please check that False will be only used for migration from muon to brave-core.
Normally, it should be prefers. @bsclifton

This comment has been minimized.

Copy link
@mbacchi

mbacchi Nov 5, 2018

Author Member

I updated that section to use 'prefers' as the default. We will set the env var TAG_ADMIN in Jenkins for the release build for the migration from browser-laptop only. @bsclifton FYI

# tag = tag.replace("TAG_ADMIN", args.tag_admin[0])
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])
@@ -99,6 +112,8 @@ def ParseArgs():
nargs=1)
parser.add_argument('--tag_ap',
nargs=1)
# parser.add_argument('--tag_admin',

This comment has been minimized.

Copy link
@simonhong

simonhong Nov 5, 2018

Collaborator

nit: This would not be used because you introduced TAG_ADMIN env.

This comment has been minimized.

Copy link
@mbacchi

mbacchi Nov 5, 2018

Author Member

Removed, I'll merge as soon as you approve again.

# nargs=1)
parser.add_argument('--tag_app_name',
nargs=1)
parser.add_argument('--brave_full_version',
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.