From 05c6bbc35e9bc2200dbd6c8a66411fc592a59009 Mon Sep 17 00:00:00 2001 From: Robert O'Rourke Date: Wed, 22 May 2019 16:23:29 +0100 Subject: [PATCH 1/2] add default build script --- .build-script | 17 +++++++++++++++++ inc/composer/class-plugin.php | 5 +++++ 2 files changed, 22 insertions(+) create mode 100644 .build-script diff --git a/.build-script b/.build-script new file mode 100644 index 0000000..7c02433 --- /dev/null +++ b/.build-script @@ -0,0 +1,17 @@ +#!/bin/bash + +#====================# +# Altis Build Script # +#====================# + +# Install composer dependencies +composer install --no-dev + +# Edit below this line to add any additional build steps. +# +# Available binaries: +# - php +# - composer +# - node +# - npm +# - git diff --git a/inc/composer/class-plugin.php b/inc/composer/class-plugin.php index 10e02f0..2887e6e 100644 --- a/inc/composer/class-plugin.php +++ b/inc/composer/class-plugin.php @@ -40,6 +40,11 @@ public function install_files() { copy( $source . '/index.php', $dest . '/index.php' ); copy( $source . '/wp-config.php', $dest . '/wp-config.php' ); + // Copy build script file if one doesn't exist. + if ( ! file_exists( $dest . '/.build-script' ) ) { + copy( $source . '/.build-script', $dest . '/.build-script' ); + } + // Update the .gitignore to include the wp-config.php, WordPress, the index.php // as these files should not be included in VCS. if ( ! file_exists( $dest . '/.gitignore' ) ) { From 22790982df89da2ec674e7060bcce55f8ebcf6b3 Mon Sep 17 00:00:00 2001 From: Robert O'Rourke Date: Wed, 22 May 2019 17:09:15 +0100 Subject: [PATCH 2/2] link to docs --- .build-script | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.build-script b/.build-script index 7c02433..1d978ec 100644 --- a/.build-script +++ b/.build-script @@ -9,9 +9,5 @@ composer install --no-dev # Edit below this line to add any additional build steps. # -# Available binaries: -# - php -# - composer -# - node -# - npm -# - git +# Learn more about build scripts in the Altis documentation: +# https://www.altis-dxp.com/resources/docs/cloud/build-scripts/