Skip to content
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
2 changes: 2 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ INSTALLATION
Extract module at drupal/modules/contrib directory and enable it from browser
by going in this path /admin/modules.

The `CONTENT_SYNC__SUPPRESS_SNAPSHOT_ON_INSTALL` environment variable might be set to something truthy in order to skip the build of the snapshot during module installation, with the expectation that the snapshot will be built by other means such as the `drush content-sync:snapshot` command ( https://github.com/discoverygarden/content_sync/blob/7816728adc70b3c85642bd254b9096a44a1d0308/src/Drush/Commands/ContentSyncCommands.php#L519-L528 ).


CONFIGURATION
-------------
Expand Down
10 changes: 6 additions & 4 deletions content_sync.install
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
/**
* Implements hook_install().
*/
function content_sync_install(){
//Create the content snapshot.
$cs_snapshoot = Drupal::service('content_sync.snaphoshot');
$cs_snapshoot->snapshot();
function content_sync_install() {
if (!filter_var(getenv('CONTENT_SYNC__SUPPRESS_SNAPSHOT_ON_INSTALL'), FILTER_VALIDATE_BOOLEAN)) {
// Create the content snapshot.
$cs_snapshoot = Drupal::service('content_sync.snaphoshot');
$cs_snapshoot->snapshot();
}
}

/**
Expand Down
Loading