CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Distmaker updates
Pages: [1]

Author Topic: Distmaker updates  (Read 423 times)

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Distmaker updates
June 24, 2014, 03:39:16 pm
Everytime an issue comes up that involves our tarballs, I look at "distmaker" ( https://github.com/civicrm/civicrm-core/tree/4.4.5/distmaker/dists ) and shutter:

  • There's a lot of copy-pasted code. Sometimes the code is identical; sometimes tweaked; sometimes, further on, there are overrides to cancel-out effects from the copied code, but you can't recognize that unless you pay very close attention. To make a new change, you change generally have to apply the change to each copy (ie 5 times).
  • When invoking distmaker, it runs "git checkout" which negates local changes or local branches -- and which puts you in the awkward position of either committing changes before you've tested them or hacking distmaker. This is partially fallout from maintaining D6+D7, and it's partially my fault (for not fully understanding distmaker and making it worse during the svn=>git migration).

So I've refactored a bit ( https://github.com/civicrm/civicrm-core/tree/master/distmaker/dists ):

  • DRY/Dedupe: Most of the code now lives in helper functions like "dm_install_core" (which copies civicrm-core files) and "dm_install_drupal" (which copies the Drupal-integration module).
  • Direct Execution (without git): If you want to build a particular tarball without triggering "git checkout", just call the build-script directly (eg "cd distmaker/dists; ./joomla_php5.sh"). However, if you want to build all the tarballs(D6+D7+SK+J+WP), then some "git checkout"s are necessary; use the master script instead (eg "cd distmaker; ./distmaker.sh all")

These changes have been applied to 4.4.next and master.

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: Distmaker updates
June 24, 2014, 04:57:10 pm
Very cool!
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Distmaker updates

This forum was archived on 2017-11-26.