Skip to content

Commit

Permalink
allow info file editing when the repository is not on d.o
Browse files Browse the repository at this point in the history
  • Loading branch information
bircher committed Jan 11, 2014
1 parent dde1f8d commit 6236c2b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions commands/make/make.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ function make_drush_command() {
'no-recursion' => 'Do not recurse into the makefiles of any downloaded projects; you can also set [do_recursion] = 0 on a per-project basis in the makefile.',
'no-patch-txt' => 'Do not write a PATCHES.txt file in the directory of each patched project.',
'no-gitinfofile' => 'Do not modify .info files when cloning from Git.',
'force-gitinfofile' => 'Force a modification of .info files when cloning from Git even if repository isn\'t hosted on Drupal.org.',
'no-gitprojectinfo' => 'Do not inject project info into .info files when cloning from Git.',
'prepare-install' => 'Prepare the built site for installation. Generate a properly permissioned settings.php and files directory.',
'tar' => 'Generate a tar archive of the build. The output filename will be [build path].tar.gz.',
'test' => 'Run a temporary test build and clean up.',
Expand Down
4 changes: 2 additions & 2 deletions commands/make/make.project.inc
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ class DrushMakeProject {
* Process info files when downloading things from git.
*/
function processGitInfoFiles() {
// Bail out if this isn't hosted on Drupal.org.
if (isset($this->download['url']) && strpos($this->download['url'], 'drupal.org') === FALSE) {
// Bail out if this isn't hosted on Drupal.org (unless --force-gitinfofile option was specified).
if (!drush_get_option('force-gitinfofile', FALSE) && isset($this->download['url']) && strpos($this->download['url'], 'drupal.org') === FALSE) {
return;
}

Expand Down
4 changes: 3 additions & 1 deletion commands/pm/pm.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1780,7 +1780,9 @@ function drush_pm_inject_info_file_metadata($project_dir, $project_name, $versio
if (preg_match('/^((\d+)\.x)-.*/', $version, $matches) && $matches[2] >= 6) {
$info .= "core = \"$matches[1]\"\n";
}
$info .= "project = \"$project_name\"\n";
if (!drush_get_option('no-gitprojectinfo', FALSE)) {
$info .= "project = \"$project_name\"\n";
}
$info .= 'datestamp = "'. time() ."\"\n";
$info .= "\n";
foreach ($info_files as $info_file) {
Expand Down

0 comments on commit 6236c2b

Please sign in to comment.