Skip to content

Commit

Permalink
Merge pull request #18 from humanmade/add-build-scipt
Browse files Browse the repository at this point in the history
Add default build script
  • Loading branch information
roborourke authored May 24, 2019
2 parents dee19ae + 2279098 commit ba4a166
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .build-script
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

#====================#
# Altis Build Script #
#====================#

# Install composer dependencies
composer install --no-dev

# Edit below this line to add any additional build steps.
#
# Learn more about build scripts in the Altis documentation:
# https://www.altis-dxp.com/resources/docs/cloud/build-scripts/
5 changes: 5 additions & 0 deletions inc/composer/class-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) ) {
Expand Down

0 comments on commit ba4a166

Please sign in to comment.