Opened on 06/02/2016 at 09:02:56 AM

Last modified on 06/02/2016 at 01:35:47 PM

#4106 new change

[build] Make it possible to overwrite config.py from the command line

Reported by: fhd Assignee:
Priority: P5 Milestone:
Module: Adblock-Plus-for-Android Keywords:
Cc: kvas Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by fhd)

Background

adblockbrowser-build has a config.py file where one can specify the path to the Android SDK/NDK, build mode etc. This is fine for local builds, but since we're aiming for building this from a CI server, creating a custom file is somewhat unrealistic. It seems to make more sense to specify all these things either in environment variables, or through the command line. The latter would be most flexible in my book.

What to change

  1. Add an equivalent command line option for each of the build parameters in config.py to build.py. The options should be lower case, and underscores should be replaced with dashes.
  2. When an option is specified both on the command line and in config.py, the command line should have precedence.
  3. The build should work as long as all necessary options are specified, whether via the command line or via config.py. It shouldn't require all options to be set in config.py.
  4. In addition, it should be possible to specify a config file from the command line. This way, we could use defaults from config.py.sample in our build automation without having to touch the file system.

Attachments (0)

Change History (4)

comment:1 Changed on 06/02/2016 at 09:03:09 AM by fhd

Vasily, what do you think of this approach?

comment:2 Changed on 06/02/2016 at 09:04:32 AM by fhd

  • Description modified (diff)

Added another idea.

comment:3 Changed on 06/02/2016 at 01:09:50 PM by kvas

Looks good to me.

It seems like this is not strictly necessary as CI build script/config could also create the config file before running the build. But having command line options would simplify the CI build script/config, so I guess it's a good thing.

comment:4 Changed on 06/02/2016 at 01:35:47 PM by fhd

  • Priority changed from P3 to P5
  • Ready set

Guess this is a P5 then - we're not sure if we need it but it wouldn't hurt.

Add Comment

Modify Ticket

Change Properties
Action
as new .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from (none).
Next status will be 'reviewing'.
 
Note: See TracTickets for help on using tickets.