Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
D
Drupal
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 50
    • Issues 50
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Development
  • Drupal
  • Issues
  • #10

Closed
Open
Opened Feb 14, 2018 by totten@tottenOwner

Keep `civicrm-version.php` up-to-date without running GenCode on all builds

We aim to allow installing CiviCRM on Drupal 8 via composer/git without requiring the admin to run GenCode.

The file civicrm-version.php is generated by GenCode. A typical copy looks like this:

<?php
/**
 * Get the CiviCRM version.
 */
function civicrmVersion() {
  return array(
    'version' => '4.7.30',
    'cms' => 'Drupal',
    'revision' => '4.7.30',
  );
}

A simple fix might be:

  • Commit the file to civicrm-core.git (much like in #1 (closed)).
  • Update tools/bin/scripts/set-version.php to maintain this file. (That script is part of the workflow whenever setup a new release.)

There's one catch: the cms field varies depending on the local runtime. However, we may be lucky here -- in a cursory check, I only found a couple places that relied on it. The task here would be to take a closer look and potentially remove this element. We'd also need to resolve these stale references to cms:

  • civicrm.drush.inc (in civicrm-backdrop-1.x, civicrm-drupal-6.x, civicrm-drupal-7.x, civicrm-drupal-8.x)
    • Use constants or functions from Drupal/Drush/Backdrop to detect the active environment.
  • install/index.php and install/template.html
    • Remove or rewrite any optional sanity checks that rely on this field.
    • Use $installType to backfill $civicrm_version['cms'] (like the WordPress conditional does)
Edited Feb 20, 2018 by totten
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
D8 General Availability
Milestone
D8 General Availability
Assign milestone
Time tracking
None
Due date
None
Reference: dev/drupal#10