From 803c561fb702506ee54d0d9377d1bff5467e8c0d Mon Sep 17 00:00:00 2001
From: TravisCarden <TravisCarden@236758.no-reply.drupal.org>
Date: Sun, 15 Apr 2012 22:08:01 -0500
Subject: [PATCH] Issue #1219366: Added d8 make file.

---
 drush/quickstart.inc   |   12 ++++++++++--
 make_templates/d8.make |    4 ++++
 2 files changed, 14 insertions(+), 2 deletions(-)
 create mode 100644 make_templates/d8.make

diff --git a/drush/quickstart.inc b/drush/quickstart.inc
index 0bf38d1..0b4be10 100644
--- a/drush/quickstart.inc
+++ b/drush/quickstart.inc
@@ -243,7 +243,7 @@ function quickstart_destroy_code($domain, $params) {
 }
 
 /**
- * Install the site.  D6 and D7 versions.
+ * Install the site. D6, D7, and D8 versions.
  *
  * @param <type> $domain
  * @param <type> $params
@@ -254,7 +254,12 @@ function quickstart_create_install($domain, $params) {
   $codepath = $params['codepath'];
 
   // load make file into string
-  $str=file_get_contents($codepath . '/CHANGELOG.txt');
+  // CHANGELOG.txt lives in the core directory in d8. Test for it there first.
+  $changelog = $codepath . '/core/CHANGELOG.txt';
+  if (!file_exists($changelog)) {
+    $changelog = $codepath . '/CHANGELOG.txt';
+  }
+  $str = file_get_contents($changelog);
   if ( preg_match("/^Drupal 6./m", $str) ) {
     $dversion = 'd6';
   }
@@ -262,6 +267,9 @@ function quickstart_create_install($domain, $params) {
   if ( preg_match("/^Drupal 7./m", $str) ) {
     $dversion = 'd7';
   }
+  if ( preg_match("/^Drupal 8./m", $str) ) {
+    $dversion = 'd8';
+  }
   
   // D6 specific
   if ($dversion=='d6') {
diff --git a/make_templates/d8.make b/make_templates/d8.make
new file mode 100644
index 0000000..24b8554
--- /dev/null
+++ b/make_templates/d8.make
@@ -0,0 +1,4 @@
+core = 8.x
+api = 2
+
+projects[drupal][type] = core
-- 
1.7.4.1

