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

Supporting composer.json dependencies in profiles. #1

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ before_script:

script:
# Generate a new 'bolted' project.
- ./bolt.sh bolt:configure
- ./bolt.sh bolt:create
- ./bolt.sh configure
- ./bolt.sh create
# Call targets in the new 'bolted' project.
- ../bolted8/bolt.sh build:validate:test -Dbehat.run-server=true -Dbehat.launch-phantom=true
# Deploy build artifact.
Expand Down
4 changes: 2 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ operating system:

# Generate and modify configuration files

From the Bolt repository’s root directory, run `./bolt.sh bolt:configure`. This
From the Bolt repository’s root directory, run `./bolt.sh configure`. This
will create your project-specific configuration files. After running, the
following files should exist in the Bolt root directory:
project.yml
Expand All @@ -56,7 +56,7 @@ Bolt’s “installer” will do the following:
* Replaces tokens in copied files with project-specific strings
* Removes installation artifacts

Run `./bolt.sh bolt:create` to do all the things! Once it’s completed, change
Run `./bolt.sh create` to do all the things! Once it’s completed, change
directories to your new project directory. E.g., cd /path/to/my/new/project.
All subsequent steps will happen inside your new project. You have left the Bolt
repository behind.
Expand Down
14 changes: 7 additions & 7 deletions build/phing/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<!-- Runs all bolt related targets. -->
<target name="bolt:new-project" description="Runs all targets required to spin up new project from Bolt."
depends="bolt:configure, bolt:create">
depends="configure, create">
</target>

<target name="bolt:clean" description="Removes generated configuration files from Bolt directory.">
Expand All @@ -32,7 +32,7 @@
<!-- Creates new configuration files to be used for new project generation.
Note: this target must be called by itself first. Other targets must be
executed separately so that they may load the correct configuration -->
<target name="bolt:configure" description="Generates default .yml configuration files based on provided example files.">
<target name="configure" description="Generates default .yml configuration files based on provided example files.">
<randomString name="project.hash_salt" length="55" stringType="lowercase_uppercase_numeric" />
<copy file="${bolt.root}/template/project.yml" todir="${bolt.root}">
<filterchain>
Expand All @@ -48,16 +48,16 @@
<echo>${bolt.root}/local.settings.php</echo>
<echo>${bolt.root}/local.drushrc.php</echo>
<echo></echo>
<echo>Modify these files and then run "./bolt.sh bolt:create" to generate a new project.</echo>
<echo>Modify these files and then run "./bolt.sh create" to generate a new project.</echo>
</target>

<!-- Create a new project directory based on current repository. -->
<target name="bolt:create" description="Create a new project based on local repository.">
<target name="create" description="Create a new project based on local repository.">
<available file="${bolt.root}/project.yml" property="project.yml.exists" value="true"/>
<if>
<not><istrue value="${project.yml.exists}"/></not>
<then>
<fail>Please run "./bolt.sh bolt:configure" before running "./bolt.sh bolt:create."</fail>
<fail>Please run "./bolt.sh configure" before running "./bolt.sh create."</fail>
</then>
</if>

Expand Down Expand Up @@ -146,8 +146,8 @@
- We do not run validate:* targets, since they can be run in parallel.
-->
<target name="bolt:self-test" description="Runs tests against acquia/bolt proper.">
<phingcall target="bolt:configure" />
<phingcall target="bolt:create" />
<phingcall target="configure" />
<phingcall target="create" />
<phingcall target="setup:build:all" />
<phingcall target="setup:drupal:install" />
<phingcall target="setup:git-hooks" />
Expand Down
10 changes: 8 additions & 2 deletions template/build/core/phing/tasks/deploy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,23 @@
</target>

<target name="deploy:artifact:profile:make" description="Build a subsidiary makefile shipped with profile.">
<property name="profile.dir" value="${deploy.dir}/docroot/profiles/contrib/${project.profile.name}"/>
<if>
<equals arg1="${project.profile.contrib}" arg2="true"/>
<and>
<equals arg1="${project.profile.contrib}" arg2="true"/>
<not><available property="profile.has.composer.json" file="${profile.dir}/composer.json" type="file"/></not>
</and>
<then>
<echo message="Building make file for ${project.profile.name}"/>
<property name="profile.dir" value="${deploy.dir}/docroot/profiles/contrib/${project.profile.name}"/>
<drush command="make" assume="yes" verbose="TRUE">
<param>"${profile.dir}/drupal-org.make"</param>
<param>"${profile.dir}"</param>
<option name="no-core"></option>
</drush>
</then>
<else>
<echo>${project.profile.name} contains a composer.json, ${profile.dir}/drupal-org.make will not be used.</echo>
</else>
</if>
</target>

Expand Down
11 changes: 9 additions & 2 deletions template/build/core/phing/tasks/setup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,24 @@
</target>

<target name="setup:build:profile" description="Build a subsidiary makefile shipped with profile">
<property name="profile.dir" value="${docroot}/profiles/contrib/${project.profile.name}"/>

<if>
<equals arg1="${project.profile.contrib}" arg2="true"/>
<and>
<equals arg1="${project.profile.contrib}" arg2="true"/>
<not><available property="profile.has.composer.json" file="${profile.dir}/composer.json" type="file"/></not>
</and>
<then>
<echo message="Building make file for ${project.profile.name}"/>
<property name="profile.dir" value="${docroot}/profiles/contrib/${project.profile.name}"/>
<drush command="make" assume="yes" verbose="TRUE">
<option name="no-core"></option>
<param>"${profile.dir}/drupal-org.make"</param>
<param>${profile.dir}</param>
</drush>
</then>
<else>
<echo>${project.profile.name} contains a composer.json, ${profile.dir}/drupal-org.make will not be used.</echo>
</else>
</if>
</target>

Expand Down