|
3 | 3 | <target name="simplesamlphp:init" description="Initializes SimpleSAMLphp for project.">
|
4 | 4 |
|
5 | 5 | <!-- Adds simplesamlphp_auth as a dependency. -->
|
6 |
| - <phingcall target="simplesamlphp:lib:init"/> |
7 |
| - |
8 |
| - <!-- Copies the configuration templates from the library to a simplesamlphp directory located in the project root. --> |
9 |
| - <phingcall target="simplesamlphp:config:init"/> |
10 |
| - |
11 |
| - <!-- Sets a property in project.yml to let other targets know simplesamlphp is installed --> |
12 |
| - <echo>Updating project.yml.</echo> |
13 |
| - <exec dir="${repo.root}" command="drupal yaml:update:value project.yml simplesamlphp true" logoutput="true" checkreturn="true" passthru="true" level="info"/> |
14 |
| - |
15 |
| - <!-- Copies a settings file used by the simplesamlphp_auth module to site's settings dir. --> |
16 |
| - <phingcall target="simplesamlphp:settings"/> |
17 |
| - |
18 |
| - <!-- Creates a symlink from the docroot to the web accessible library dir. --> |
19 |
| - <echo>Creating a symbolic link from ${docroot}/simplesaml to web accessible directory in the simplesamlphp library</echo> |
20 |
| - <symlink target="../vendor/simplesamlphp/simplesamlphp/www/" link="${docroot}/simplesaml" overwrite="true" /> |
21 |
| - |
22 |
| - <!-- Outputs a message to edit the new config files. --> |
23 |
| - <phingcall target="simplesamlphp:init:complete"/> |
24 |
| - |
| 6 | + <available property="simplesamlphp" file="${blt.root}/settings/simplesamlphp.settings.php"/> |
| 7 | + |
| 8 | + <if> |
| 9 | + <isfalse value="${simplesamlphp}"/> |
| 10 | + <then> |
| 11 | + <phingcall target="simplesamlphp:lib:init"/> |
| 12 | + |
| 13 | + <!-- Copies the configuration templates from the library to a simplesamlphp directory located in the project root. --> |
| 14 | + <phingcall target="simplesamlphp:config:init"/> |
| 15 | + |
| 16 | + <!-- Copies a settings file used by the simplesamlphp_auth module to blt's settings dir. --> |
| 17 | + <phingcall target="simplesamlphp:settings"/> |
| 18 | + |
| 19 | + <!-- Creates a symlink from the docroot to the web accessible library dir. --> |
| 20 | + <echo>Creating a symbolic link from ${docroot}/simplesaml to web accessible directory in the simplesamlphp library</echo> |
| 21 | + <symlink target="../vendor/simplesamlphp/simplesamlphp/www/" link="${docroot}/simplesaml" overwrite="true" /> |
| 22 | + |
| 23 | + <!-- Outputs a message to edit the new config files. --> |
| 24 | + <phingcall target="simplesamlphp:init:complete"/> |
| 25 | + </then> |
| 26 | + <else> |
| 27 | + <echo>SimpleSAMLphp has already been initialized by BLT.</echo> |
| 28 | + </else> |
| 29 | + </if> |
25 | 30 | </target>
|
26 | 31 |
|
27 | 32 | <!-- Adds simplesamlphp_auth as a dependency. -->
|
28 |
| - <target name="simplesamlphp:lib:init" unless="simplesamlphp" hidden="true"> |
| 33 | + <target name="simplesamlphp:lib:init" hidden="true"> |
29 | 34 | <echo>Adding SimpleSAMLphp Auth module as a dependency.</echo>
|
30 | 35 | <exec dir="${repo.root}" command="composer require drupal/simplesamlphp_auth:8.3.x-dev#283994f" logoutput="true" checkreturn="true" passthru="true" level="info"/>
|
31 | 36 | </target>
|
32 | 37 |
|
33 | 38 | <!-- Copies the configuration templates from the library to a simplesamlphp directory located in the project root. -->
|
34 |
| - <target name="simplesamlphp:config:init" unless="simplesamlphp" hidden="true"> |
| 39 | + <target name="simplesamlphp:config:init" hidden="true"> |
35 | 40 | <echo>Copying config files to ${repo.root}/simplesamlphp/config.</echo>
|
36 | 41 | <copy todir="${repo.root}/simplesamlphp/config" overwrite="false">
|
37 | 42 | <filelist dir="${repo.root}/vendor/simplesamlphp/simplesamlphp/config-templates" files="authsources.php, config.php"/>
|
|
0 commit comments