Skip to content

remove build flavor in favor of build hook #708

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

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
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
5 changes: 4 additions & 1 deletion templates/drupal9-govcms9/files/.platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,17 @@ mounts:

# Configuration of the build of this application.
build:
flavor: composer
flavor: none

# The hooks executed at various points in the lifecycle of the application.
hooks:
# The build hook runs after Composer to finish preparing up your code.
# No services are available but the disk is writeable.
build: |
set -e
# @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev`
composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader

# The deploy hook runs after your application has been deployed and started.
# Code cannot be modified at this point but the database is available.
# The site is not accepting requests while this script runs so keep it
Expand Down
5 changes: 4 additions & 1 deletion templates/drupal9-multisite/files/.platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,17 @@ mounts:
# Configuration of the build of this application.
build:
# Automatically run `composer install` on every build.
flavor: composer
flavor: none

# The hooks executed at various points in the lifecycle of the application.
hooks:
# The build hook runs after Composer to finish preparing up your code.
# No services are available but the disk is writeable.
build: |
set -e
# @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev`
composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader

# The deploy hook runs after your application has been deployed and started.
# Code cannot be modified at this point but the database is available.
# The site is not accepting requests while this script runs so keep it
Expand Down
7 changes: 5 additions & 2 deletions templates/drupal9/files/.platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,17 @@ mounts:

# Configuration of the build of this application.
build:
flavor: composer
flavor: none

# The hooks executed at various points in the lifecycle of the application.
hooks:
# The build hook runs after Composer to finish preparing up your code.
# No services are available but the disk is writeable.
build: |
set -e
# @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev`
composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader

# The deploy hook runs after your application has been deployed and started.
# Code cannot be modified at this point but the database is available.
# The site is not accepting requests while this script runs so keep it
Expand Down Expand Up @@ -148,7 +151,7 @@ crons:
# Run Drupal's cron tasks every 19 minutes.
drupal:
spec: '*/19 * * * *'
commands:
commands:
start: 'cd web ; drush core-cron'

source:
Expand Down
5 changes: 4 additions & 1 deletion templates/gatsby-drupal/files/drupal/.platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,17 @@ mounts:

# Configuration of the build of this application.
build:
flavor: composer
flavor: none

# The hooks executed at various points in the lifecycle of the application.
hooks:
# The build hook runs after Composer to finish preparing up your code.
build: |
set -e
bash install-redis.sh 4.3.0
# @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev`
composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader

# The deploy hook runs after your application has been deployed and started.
deploy: |
set -e
Expand Down
10 changes: 9 additions & 1 deletion templates/gatsby-wordpress/files/wordpress/.platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type: 'php:8.1'

# Configuration of the build of the application.
build:
flavor: composer
flavor: none

dependencies:
php:
Expand Down Expand Up @@ -65,3 +65,11 @@ mounts:
"wordpress/wp-content/uploads":
source: local
source_path: "uploads"

hooks:
build: |
# Exit hook immediately if a command exits with a non-zero status.
set -e

# @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev`
composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader
4 changes: 3 additions & 1 deletion templates/magento2ce/files/.platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ runtime:

# Configuration of the build of this application.
build:
flavor: composer
flavor: none

dependencies:
php:
Expand Down Expand Up @@ -58,6 +58,8 @@ mounts:
hooks:
build: |
set -e
# @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev`
composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader
php ./vendor/bin/ece-tools build:generate
php ./vendor/bin/ece-tools build:transfer
deploy: |
Expand Down
4 changes: 3 additions & 1 deletion templates/sylius/files/.platform.app.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: app
type: php:8.1
build:
flavor: composer
flavor: none

variables:
env:
Expand All @@ -13,6 +13,8 @@ variables:
hooks:
build: |
set -e
# @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev`
composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader
# Install the node version specified in the .nvmrc file
n auto
# Reset the location hash to recognize the newly installed version
Expand Down
4 changes: 3 additions & 1 deletion templates/typo3/files/.platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ runtime:
# composer --no-ansi --no-interaction install --no-progress --prefer-dist --optimize-autoloader
# if composer.json is detected.
build:
flavor: composer
flavor: none

# The relationships of the application with services or other applications.
# The left-hand side is the name of the relationship as it will be exposed
Expand Down Expand Up @@ -122,6 +122,8 @@ hooks:
build: |
# Exit hook immediately if a command exits with a non-zero status.
set -e
# @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev`
composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader

# Start the installation with no interaction or extension setup, using `SetupConfiguration.yaml`.
if [ ! -f var/platformsh.installed ]; then
Expand Down
10 changes: 9 additions & 1 deletion templates/wordpress-bedrock/files/.platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type: "php:8.1"

# Configuration of the build of the application.
build:
flavor: composer
flavor: none

dependencies:
php:
Expand Down Expand Up @@ -71,6 +71,14 @@ mounts:
source: local
source_path: "uploads"

hooks:
build: |
# Exit hook immediately if a command exits with a non-zero status.
set -e

# @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev`
composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader

source:
operations:
auto-update:
Expand Down
5 changes: 4 additions & 1 deletion templates/wordpress-composer/files/.platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type: 'php:8.1'

# Configuration of the build of the application.
build:
flavor: composer
flavor: none

dependencies:
php:
Expand All @@ -19,6 +19,9 @@ dependencies:
hooks:
build: |
set -e
# @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev`
composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader

# Copy manually-provided plugins into the plugins directory.
# This allows manually-provided and composer-provided plugins to coexist.
rsync -a plugins/* wordpress/wp-content/plugins/
Expand Down
10 changes: 9 additions & 1 deletion templates/wordpress-woocommerce/files/.platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:

# Configuration of the build of the application.
build:
flavor: composer
flavor: none

# The relationships of the application with services or other applications.
# The left-hand side is the name of the relationship as it will be exposed
Expand Down Expand Up @@ -74,6 +74,14 @@ mounts:
source: local
source_path: "uploads"

hooks:
build: |
# Exit hook immediately if a command exits with a non-zero status.
set -e

# @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev`
composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader

source:
operations:
auto-update:
Expand Down