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

Pull out settings.php templating #170

Merged
merged 16 commits into from
Oct 15, 2021
Merged
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
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Change Log

## 4.0-alpha1

The goal of this release is to remove some of the templating functionality that makes `planaitrnet/the-build` and `palantirnet/drupal-skeleton` harder to use and maintain.

* Removed gitignore template
* Removed settings.php templating
* Changed how host-specific settings files are managed

`palantirnet/drupal-skeleton` now contains the `settings.php` scaffolding for Drupal.

The plan is to remove more templating/wrapping before releasing 4.0.

## 3.0.3 - November 25, 2020

### Fixed
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ $> vendor/bin/the-build-installer
This will trigger an interactive prompt to configure your basic build properties, adding the following templated files and directories:

* `.circleci/`
* `.gitignore`
* `.the-build/`
* `behat.yml`
* `build.xml`
Expand Down
18 changes: 10 additions & 8 deletions defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
build:
# The destination host, either 'acquia', 'pantheon', 'platformsh', or 'other'. This is
# currently only used when setting up the settings.php file for a Drupal site.
host: other
host: acquia

# Drupal configuration used by targets/drupal.xml
drupal:
# Relative path to the Drupal web root. This is co-dependent with the composer installer
# configuration in your `composer.json`. Use caution when changing this value.
root: web
# **This is a required value but must be set in a project's own build.yml file**
#root: web

# Comma-separated list of directories that should be present for Drupal development.
create_dirs: "${drupal.root}/modules/custom,${drupal.root}/themes/custom,${drupal.root}/profiles/custom,config/config_split/development,config/config_split/staging,config/config_split/production"
Expand Down Expand Up @@ -52,8 +53,9 @@ drupal:
dir: default

# REQUIRED: Your site's URI; the default should be the URI of your local
# development environment.
uri: "https://${projectname}.local"
# development environment. This must be present in your
# .the-build/build.yml file.
# uri: "https://${projectname}.ddev.site"

# Customizing the following values is OPTIONAL. If these values are not
# explicitly configured, they will be set in the-build.xml based on the
Expand Down Expand Up @@ -109,9 +111,9 @@ drupal:
database:
# This value is required, but a default is set in the-build.xml.
# database: drupal
username: root
password: root
host: 127.0.0.1
username: db
password: db
host: db

# Configuration used by the default 'build' target.
build:
Expand Down Expand Up @@ -240,7 +242,7 @@ phpcs:
# use the extensions option (below). This option should not be used with Coder >= 8.3.7, which only
# checks php, inc, css, and js by default.
ignore: "*.md"

# Comma-separated list of extensions to check in the PHP_CodeSniffer review.
extensions: "php,module,inc,install,test,profile,theme,css,info,txt,yml,js"

Expand Down
17 changes: 1 addition & 16 deletions defaults/install/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,6 @@
<mkdir dir="${drupal.root}/${drupal.site.settings.file_private_path}" />
<chmod file="${drupal.root}/${drupal.site.settings.file_private_path}" mode="640" />

<!-- Copy the settings.build.php and services.build.php templates into place. -->
<copy todir="${build.dir}" overwrite="true" mode="544">
<!-- Copy the template files -->
<filelist dir="${build.dir}" files="${drupal.site.build.settings_template},${drupal.site.build.services_template}" />
<!-- Map templates to their destinations -->
<mapper type="firstmatch">
<mapper type="glob" from="${drupal.site.build.settings_template}" to="${drupal.site.build.settings_dest}" />
<mapper type="glob" from="${drupal.site.build.services_template}" to="${drupal.site.build.services_dest}" />
</mapper>
<!-- Substitute property values -->
<filterchain>
<expandproperties />
</filterchain>
</copy>

<!-- Include styleguide resources in the theme. This approach will symlink
resources in development environments, and copy them for artifact builds. -->
<!-- <includeresource source="styleguide/source/assets/css" dest="${drupal.root}/themes/custom/example_theme/css" /> -->
Expand Down Expand Up @@ -175,7 +160,7 @@

<!-- Default target: list -->
<target name="list" hidden="true">
<exec command="phing -q -f ${phing.file} -l" passthru="true"/>
<exec command="${phing.home}/bin/phing -q -f ${phing.file} -l" passthru="true"/>
<echo>Find more documentation for palantirnet/the-build on GitHub:

https://github.com/palantirnet/the-build#using-the-build</echo>
Expand Down
6 changes: 0 additions & 6 deletions defaults/install/drupal/services.build.yml

This file was deleted.

43 changes: 0 additions & 43 deletions defaults/install/drupal/settings.build-acquia.php

This file was deleted.

18 changes: 0 additions & 18 deletions defaults/install/drupal/settings.build-pantheon.php

This file was deleted.

21 changes: 0 additions & 21 deletions defaults/install/drupal/settings.build-platformsh.php

This file was deleted.

49 changes: 0 additions & 49 deletions defaults/install/drupal/settings.build.php

This file was deleted.

36 changes: 0 additions & 36 deletions defaults/install/gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion defaults/install/pantheon.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Pantheon configuration file
api_version: 1
web_docroot: true
php_version: 7.2
php_version: 7.4
drush_version: 8
10 changes: 0 additions & 10 deletions defaults/install/the-build/build.acquia.yml

This file was deleted.

10 changes: 0 additions & 10 deletions defaults/install/the-build/build.pantheon.yml

This file was deleted.

10 changes: 0 additions & 10 deletions defaults/install/the-build/build.platformsh.yml

This file was deleted.

2 changes: 2 additions & 0 deletions defaults/install/the-build/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# found in the-build's repository.
# @see https://github.com/palantirnet/the-build/blob/release-2.0/defaults.yml

projectname: ${projectname}

# These properties are used when building the settings.php and settings.yml for your
# Drupal site, and by some of the targets in the default build.xml file.
# @see .the-build/drupal/services.build.yml
Expand Down
Loading