Support relative paths with and without specified filenames#56
Merged
schlessera merged 2 commits intowp-cli:mainfrom Jun 30, 2022
Merged
Support relative paths with and without specified filenames#56schlessera merged 2 commits intowp-cli:mainfrom
schlessera merged 2 commits intowp-cli:mainfrom
Conversation
…ames Without a specified path, the default output folder is the plugin's parent directory.
Member
Author
schlessera
approved these changes
Jun 30, 2022
BrianHenryIE
added a commit
to BrianHenryIE/dist-archive-command
that referenced
this pull request
Jul 7, 2022
1. It seems `sys_get_temp_dir()` was being shared across multiple tests, so files already existed when subsequent tests were run. 2. Looks like the "no distignore file is present" test was failing after wp-cli#56 was merged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Specifying the output directory was not working as expected, as discussed in #34. e.g. "
wp dist-archive . ./scratch/build.zip --create-target-dirsucceeds 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:
wp dist-archive . hello-world.zip– output filename, no pathwp dist-archive . ./hello-world.zip– output filename, with.for pathwp dist-archive wp-content/plugins/hello-world wp-content– relative output path, no filenamewp dist-archive wp-content/plugins/hello-world ./subdir/hello-world.zip– relative output path, with filenamewp dist-archive . {RUN_DIR}/hello-world.zip– using.as input and absolute output path, with filenamewp dist-archive wp-content/plugins/hello-world .– using.as output path, no filenameNo documentation changed.
Fixes #34