Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow info file editing when the repository is not on d.o #368

Merged
merged 1 commit into from
Jan 21, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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