-
Notifications
You must be signed in to change notification settings - Fork 202
[ feature ] Update theme pull/push --only
option to accept multiple patterns
#2002
[ feature ] Update theme pull/push --only
option to accept multiple patterns
#2002
Conversation
…me pull`/`push` - updates work from Shopify#1892 - see comment Shopify#1892 (comment)
- fixes test issue where glob and regex test cases were swapped
--only
option to accept multiple patterns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thanks a lot for this @kilgore5 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @kilgore5! Great stuff 🚀
@kilgore5 regarding the post-release steps you've mentioned:
Thanks again for the excellent PR! |
Thank you very much for reviewing @macournoyer @karreiro ! @karreiro re: the post-deploy steps...
|
Thank you for the PR and the clarification, @kilgore5! 🚀 The docs team is taking care of updating the |
Can confirm that this was also an issue for me if specifying multiple --ignore flags. If you use 3 --ignores and log the ignore_pattnerns here: https://github.com/Shopify/shopify-cli/blob/main/lib/project_types/theme/commands/push.rb#L35 You will see that it's getting the first ignore 3 times. |
WHY are these changes introduced?
After #1892, users can use the
--only
arg to "include" only certain files when usingtheme pull
/push
, but only one option pattern is accepted (see comment #1892 (comment))This PR updates the
--only
option to allow it to be used multiple times, similarly to how the--ignore
option behaves. E.g.shopify theme pull -o 'templates/*.json' -o 'config/settings_data.json'
WHAT is this pull request doing?
This PR updates the
ShopifyCLI::Theme::IncludeFilter
to allow for multiple patterns to function similarly to howShopifyCLI::Theme::IgnoreFilter
already does.How to test your changes?
empty-ish theme repo
pull
templates
andconfig
filessee expected files in
config
andtemplates
directoriesPost-release steps
theme pull
/push
command help text to note that--ignore
and--include
options can be used multiple times.theme pull
/push
docs to document the--ignore--include
option (https://shopify.dev/themes/tools/cli/theme-commands#push, https://shopify.dev/themes/tools/cli/theme-commands#pull)Update checklist