wp-cli / dist-archive-command

Create a distribution .zip or .tar.gz based on a plugin or theme's .distignore file
https://developer.wordpress.org/cli/commands/dist-archive/
MIT License
47 stars 23 forks source link

Support relative paths with and without specified filenames #56

Closed BrianHenryIE closed 2 years ago

BrianHenryIE commented 2 years ago

Specifying the output directory was not working as expected, as discussed in #34. e.g. "wp dist-archive . ./scratch/build.zip --create-target-dir succeeds but the file is not placed in the subdirectory of ., rather it's at ../scratch/build.zip"

Without a specified path or filename, the default output folder is the plugin's parent directory with the generated (versioned) filename. Without a specified path, the default output folder is the plugin's parent directory with the specified filename. With a specified path and filename, the archive is saved to that path and filename. With a specified path and no filename, the archive is saved to that path with the generated (versioned) filename.

Tests added for:

No documentation changed.

Fixes #34

BrianHenryIE commented 2 years ago

Related to issue #48, PR #49.