Skip to content

Commit

Permalink
allow npm config override of target_os and target_arch for android/io…
Browse files Browse the repository at this point in the history
  • Loading branch information
bridiver committed Oct 22, 2019
1 parent 160366f commit 1b85207
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion build/lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ const Config = function () {
this.defaultGClientFile = path.join(this.rootDir, '.gclient')
this.gClientFile = process.env.BRAVE_GCLIENT_FILE || this.defaultGClientFile
this.gClientVerbose = getNPMConfig(['gclient_verbose']) || false
this.targetArch = 'x64'
this.targetArch = getNPMConfig(['target_arch']) || 'x64'
this.targetOS = getNPMConfig(['target_os'])
this.gypTargetArch = 'x64'
this.targetApkBase ='classic'
this.androidOverrideVersionName = '0.0.0'
Expand Down
10 changes: 5 additions & 5 deletions build/scripts/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ program
.command('build')
.option('-C <build_dir>', 'build config (out/Debug, out/Release')
.option('--target_os <target_os>', 'target OS')
.option('--target_arch <target_arch>', 'target architecture', 'x64')
.option('--target_arch <target_arch>', 'target architecture')
.option('--target_apk_base <target_apk_base>', 'target Android OS apk (classic, modern, mono)', 'classic')
.option('--android_override_version_name <android_override_version_name>', 'Android version number')
.option('--mac_signing_identifier <id>', 'The identifier to use for signing')
Expand All @@ -58,7 +58,7 @@ program
program
.command('create_dist')
.option('-C <build_dir>', 'build config (out/Debug, out/Release')
.option('--target_arch <target_arch>', 'target architecture', 'x64')
.option('--target_arch <target_arch>', 'target architecture')
.option('--mac_signing_identifier <id>', 'The identifier to use for signing')
.option('--mac_installer_signing_identifier <id>', 'The identifier to use for signing the installer')
.option('--mac_signing_keychain <keychain>', 'The identifier to use for signing', 'login')
Expand All @@ -76,7 +76,7 @@ program

program
.command('upload')
.option('--target_arch <target_arch>', 'target architecture', 'x64')
.option('--target_arch <target_arch>', 'target architecture')
.action(upload)

program
Expand Down Expand Up @@ -127,7 +127,7 @@ program

program
.command('cibuild')
.option('--target_arch <target_arch>', 'target architecture', 'x64')
.option('--target_arch <target_arch>', 'target architecture')
.action((options) => {
options.official_build = true
build('Release', options)
Expand All @@ -142,7 +142,7 @@ program
.option('--single_process', 'uses a single process to run tests to help with debugging')
.option('--test_launcher_jobs <test_launcher_jobs>', 'Number of jobs to launch')
.option('--target_os <target_os>', 'target OS')
.option('--target_arch <target_arch>', 'target architecture', 'x64')
.option('--target_arch <target_arch>', 'target architecture')
.arguments('[build_config]')
.action(test)

Expand Down

0 comments on commit 1b85207

Please sign in to comment.