Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation request: how to compress to a file within plugin folder #90

Closed
helgatheviking opened this issue Apr 1, 2024 · 7 comments

Comments

@helgatheviking
Copy link

I keep trying wp dist-archive . deploy/ --create-target-dir and variations therefore but I can't seem to get the zip archive to get compressed to mycoolplugin/deploy/mycoolplugin-1.0.0.zip it ends up generated as deploy.zip instead. I assume this is a path mistake I'm making but it would be nice to see an example in the docu.

@BrianHenryIE
Copy link
Member

Try:

wp dist-archive . ./deploy --plugin-dirname=mycoolplugin --create-target-dir

@helgatheviking
Copy link
Author

Hmm... that's throwing an error

Error: Parameter errors:
 unknown --plugin-dirname parameter
Script wp dist-archive . ./deploy --plugin-dirname=anonymize-woocommerce-customers --create-target-dir handling the zip event returned with error code 1

@BrianHenryIE
Copy link
Member

Ah, there hasn’t been a tagged release since before that was added. If you’re installing with Composer, use dev-main as the version, if you’re using the WP CLI package installer, use wp package install wp-cli/dist-archive-command:dev-main.

https://github.com/wp-cli/dist-archive-command/releases

@ernilambar
Copy link
Member

@helgatheviking If you run the command staying at the plugin path then that parameter is not needed. Try following:

wp dist-archive . ./deploy --create-target-dir

@helgatheviking
Copy link
Author

Thank you @BrianHenryIE and @ernilambar !

@danielbachhuber
Copy link
Member

Ah, there hasn’t been a tagged release since before that was added.

I just tagged 3.0.0: https://github.com/wp-cli/dist-archive-command/releases/tag/v3.0.0

@BrianHenryIE
Copy link
Member

Great. That also helps in: 10up/action-wordpress-plugin-deploy#139 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants