This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Commit f2b971e 1 parent 77a8549 commit f2b971e Copy full SHA for f2b971e
File tree 4 files changed +42
-43
lines changed
template/tests/phpunit/Bolt
4 files changed +42
-43
lines changed Original file line number Diff line number Diff line change 8
8
9
9
<target name =" local:refresh" description =" Refreshes local environment from upstream testing database." depends =" setup:build, local:sync, local:update" />
10
10
11
- <target name =" local:setup" description =" Install dependencies, builds docroot, installs Drupal; uses local drush alias." >
11
+ <target name =" local:setup" description =" Install dependencies, builds docroot, installs Drupal; uses local drush alias." depends = " local:settings " >
12
12
<phingcall target =" setup" >
13
13
<property name =" drush.alias" value =" ${drush.aliases.local}" />
14
14
</phingcall >
15
15
</target >
16
16
17
+ <target name =" local:settings" >
18
+ <echo >Generating local settings files.</echo >
19
+
20
+ <if >
21
+ <not >
22
+ <available file =" ${repo.root}/project.local.yml" type =" file" />
23
+ </not >
24
+ <then >
25
+ <copy file =" ${repo.root}/example.project.local.yml" tofile =" ${repo.root}/project.local.yml" />
26
+ </then >
27
+ </if >
28
+
29
+ <if >
30
+ <not >
31
+ <available file =" ${docroot}/sites/${multisite.name}/settings/local.settings.php" type =" file" />
32
+ </not >
33
+ <then >
34
+ <copy file =" ${docroot}/sites/${multisite.name}/settings/default.local.settings.php" tofile =" ${docroot}/sites/${multisite.name}/settings/local.settings.php" />
35
+ </then >
36
+ </if >
37
+
38
+ <if >
39
+ <not >
40
+ <available file =" ${docroot}/sites/${multisite.name}/local.drushrc.php" type =" file" />
41
+ </not >
42
+ <then >
43
+ <copy file =" ${docroot}/sites/${multisite.name}/default.local.drushrc.php" tofile =" ${docroot}/sites/${multisite.name}/local.drushrc.php" />
44
+ </then >
45
+ </if >
46
+
47
+ <echo >Expanding Phing variables in ${docroot}/sites/${multisite.name}/local.drushrc.php.</echo >
48
+
49
+ <reflexive file =" ${docroot}/sites/${multisite.name}/local.drushrc.php" >
50
+ <filterchain >
51
+ <expandproperties />
52
+ </filterchain >
53
+ </reflexive >
54
+ </target >
55
+
17
56
<target name =" local:sync" description =" Synchronize remote environment with local environment."
18
57
depends =" setup:drupal:settings" >
19
58
<exec dir =" ${docroot}" command =" ${drush.cmd} sql-drop -y" logoutput =" true" checkreturn =" true" />
Original file line number Diff line number Diff line change 62
62
<chmod mode =" 0755" failonerror =" false" file =" ${docroot}/sites/default/settings.php" />
63
63
<echo >Ensuring that blt.settings.php is required by settings.php</echo >
64
64
<exec dir =" ${docroot}/sites/default" command =" grep blt.settings.php settings.php || echo 'require DRUPAL_ROOT . " /sites/default/settings/blt.settings.php" ;' >> settings.php " logoutput =" false" checkreturn =" true" />
65
-
66
- <echo >Generating local settings files.</echo >
67
-
68
- <if >
69
- <not >
70
- <available file =" ${repo.root}/project.local.yml" type =" file" />
71
- </not >
72
- <then >
73
- <copy file =" ${repo.root}/example.project.local.yml" tofile =" ${repo.root}/project.local.yml" />
74
- </then >
75
- </if >
76
-
77
- <if >
78
- <not >
79
- <available file =" ${docroot}/sites/${multisite.name}/settings/local.settings.php" type =" file" />
80
- </not >
81
- <then >
82
- <copy file =" ${docroot}/sites/${multisite.name}/settings/default.local.settings.php" tofile =" ${docroot}/sites/${multisite.name}/settings/local.settings.php" />
83
- </then >
84
- </if >
85
-
86
- <if >
87
- <not >
88
- <available file =" ${docroot}/sites/${multisite.name}/local.drushrc.php" type =" file" />
89
- </not >
90
- <then >
91
- <copy file =" ${docroot}/sites/${multisite.name}/default.local.drushrc.php" tofile =" ${docroot}/sites/${multisite.name}/local.drushrc.php" />
92
- </then >
93
- </if >
94
-
95
- <echo >Expanding Phing variables in ${docroot}/sites/${multisite.name}/local.drushrc.php.</echo >
96
-
97
- <reflexive file =" ${docroot}/sites/${multisite.name}/local.drushrc.php" >
98
- <filterchain >
99
- <expandproperties />
100
- </filterchain >
101
- </reflexive >
102
-
103
- <!-- Re-extract value of $options['uri'] in case it was not yet set. -->
104
- <!-- @todo Add multisite support. -->
105
- <phpVariable file =" ${repo.root}/drush/drushrc.php" variable =" options[uri]" outputProperty =" local_url" />
106
65
</target >
107
66
108
67
<target name =" setup:drupal:install"
Original file line number Diff line number Diff line change @@ -10,5 +10,6 @@ function blt() {
10
10
$GIT_ROOT/vendor/bin/blt "$@"
11
11
else
12
12
echo "You must run this command from within a BLT-generated project repository."
13
+ echo "If you are in a BLT-generated repository, try running 'composer install'."
13
14
fi
14
15
}
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public function testSetupBehat() {
17
17
// Assert that a local.yml file was created in the new project.
18
18
$ this ->assertFileExists ($ this ->projectDirectory . '/tests/behat/local.yml ' );
19
19
$ this ->assertNotContains (
20
- '${local_url } ' ,
20
+ '${local.uri } ' ,
21
21
file_get_contents ("{$ this ->projectDirectory }/tests/behat/local.yml " )
22
22
);
23
23
}
You can’t perform that action at this time.
0 commit comments