Skip to content

Commit

Permalink
Updating BLT templated files. (#912)
Browse files Browse the repository at this point in the history
  • Loading branch information
grasmash authored Jan 5, 2017
1 parent 1f8c941 commit 7cadb4f
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions phing/tasks/blt.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
<project name="blt" default="update">
<target name="create-project" hidden="true">
<exec dir="${repo.root}" command="git init" logoutput="true" checkreturn="true" level="${blt.exec_level}" passthru="true"/>

<!-- Remove files leftover from acquia/blt-project. -->
<delete failonerror="false">
<fileset dir="${repo.root}">
<include name=".travis.yml"/>
<include name="LICENSE.txt"/>
<include name="README.md"/>
</fileset>
</delete>

<!-- Pull in initial template files. -->
<exec dir="${repo.root}" command="blt blt:rsync-template" logoutput="true" checkreturn="true" level="${blt.exec_level}" passthru="true"/>
<exec dir="${repo.root}" command="blt blt:update-composer" logoutput="true" checkreturn="true" level="${blt.exec_level}" passthru="true"/>

<echo>Updating composer dependencies, this make take a while...</echo>
<exec dir="${repo.root}" command="export COMPOSER_PROCESS_TIMEOUT=600; composer update --no-interaction" logoutput="true" checkreturn="true" level="${blt.exec_level}" passthru="true"/>
<copy file="${repo.root}/docroot/profiles/contrib/lightning/lightning.extend.yml" tofile="${repo.root}/docroot/sites/default/lightning.extend.yml"/>

<!--Write project.machine_name to project.yml.-->
<!--Write project.machine_name to project.yml, using name of working directory as value.. -->
<exec dir="${repo.root}" command="result=${PWD##*/}; printf '%s\n' &quot;${PWD##*/}&quot;" logoutput="false" checkreturn="true" level="${blt.exec_level}" passthru="false" outputProperty="dirname"/>
<exec dir="${repo.root}" command="${composer.bin}/drupal yaml:update:value ${blt.config-files.project} project.machine_name '${dirname}'" logoutput="true" checkreturn="false" level="${blt.exec_level}" passthru="true"/>
<exec dir="${repo.root}" command="${composer.bin}/yaml-cli update:value ${blt.config-files.project} project.machine_name '${dirname}'" logoutput="true" checkreturn="false" level="${blt.exec_level}" passthru="true"/>

<!-- Remove default git remote -->
<exec dir="${repo.root}" command="${composer.bin}/drupal yaml:update:value ${blt.config-files.project} git.remotes.0 ''" logoutput="true" checkreturn="false" level="${blt.exec_level}" passthru="true"/>
<exec dir="${repo.root}" command="${composer.bin}/yaml-cli update:value ${blt.config-files.project} git.remotes.0 ''" logoutput="true" checkreturn="false" level="${blt.exec_level}" passthru="true"/>

<exec dir="${repo.root}" command="git add -A" logoutput="true" checkreturn="true" level="${blt.exec_level}" passthru="true"/>
<exec dir="${repo.root}" command="git commit -m 'Initial commit.'" logoutput="true" checkreturn="true" level="${blt.exec_level}" passthru="true"/>
Expand Down

0 comments on commit 7cadb4f

Please sign in to comment.