Skip to content

Commit

Permalink
skip debug files when archiving
Browse files Browse the repository at this point in the history
  • Loading branch information
mircobabini committed Aug 30, 2021
1 parent d818b76 commit 602272d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions command.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class Swim_WP_CLI extends WP_CLI_Command {
// todo move the version to the "package meta" docblock
const VERSION = '1.3.2';
const VERSION = '1.3.3';

/**
* A test which always gives success and the current version.
Expand Down Expand Up @@ -57,7 +57,7 @@ public function archive( array $args = [], array $assoc_args = [] ) {
// NB: zip -r using a dirpath will cause the structure to be kept into the zip.
// to avoid this issue, use pushd/popd: https://superuser.com/questions/119649/avoid-unwanted-path-in-zip-file/119661#119661
WP_CLI::debug( "pushd '$archive_root'; zip -r '$target_filepath' . -x 'wp-content/cache*'; popd;" );
exec( "pushd '$archive_root'; zip -r '$target_filepath' . -x 'wp-content/cache*'; popd;" );
exec( "pushd '$archive_root'; zip -r '$target_filepath' . -x 'wp-content/cache*' -x 'wp-content/debug*'; popd;" );

// delete db dump
WP_CLI::debug( "unlink: $archive_root/$database_filename" );
Expand Down

0 comments on commit 602272d

Please sign in to comment.