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

Introduce ‘shopify theme duplicate’ command #3908

Open
knjshimi opened this issue May 19, 2024 · 12 comments
Open

Introduce ‘shopify theme duplicate’ command #3908

knjshimi opened this issue May 19, 2024 · 12 comments
Assignees
Labels
Area: @shopify/theme @shopify/theme package issues Type: Enhancement New feature or request

Comments

@knjshimi
Copy link

What area(s) will this request affect?

Theme

What type of change do you want to see?

New feature

Overview

Introduce a theme duplicate command in the cli, so developers can duplicate a theme in the library.

Motivation

Pushing an entire new theme via cli takes considerably longer than duplicating a pre existing theme - especially in cases where the merchant has lots of assets.

In my workflow, I never overwrite the live theme directly. Instead, when deploying, I create a new theme and allow the merchant to review it before making the decision to publish.

With the duplicate command, I could simply duplicate the live theme and push any changes to it - in that case only the files that have changed will be overwritten.

@knjshimi knjshimi added the Type: Enhancement New feature or request label May 19, 2024
@JeriverGAP
Copy link

This is a clone of the (closed) issue here:
#2000

Just to reiterate, this would be very useful for CI/CD workflows.

@gonzaloriestra gonzaloriestra added the Area: @shopify/theme @shopify/theme package issues label May 22, 2024
@jonXmack
Copy link

+1 for this!

Copy link
Contributor

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.
→ If there's no activity within a week, then a bot will automatically close this.
Thanks for helping to improve Shopify's dev tooling and experience.

P.S. You can learn more about why we stale issues here.

@jonXmack
Copy link

jonXmack commented Jul 26, 2024

Still relevant

Copy link
Contributor

github-actions bot commented Sep 7, 2024

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.
→ If there's no activity within a week, then a bot will automatically close this.
Thanks for helping to improve Shopify's dev tooling and experience.

P.S. You can learn more about why we stale issues here.

@knjshimi
Copy link
Author

knjshimi commented Sep 7, 2024

still relevant

@mgrbec
Copy link

mgrbec commented Sep 9, 2024

This issue is still relevant. We actually have another reason for it - to keep all theme translations. We tried the long way to first download current published theme and then publish it as a new theme. In that case theme translations get removed and lost. But if we use theme duplicate, all theme translations are kept in the duplicated theme. CLI command that would behave the same would actually enable us to use CI/CD the way we need, because currently we need to work directly on the published theme.

@aswamy aswamy self-assigned this Oct 21, 2024
@dalgarin
Copy link

We are just starting our shopify implementation and being able to duplicate a theme programmatically seems like a critical requirement for CI/CD and general deployment automation.

@sergeifilippov
Copy link

sergeifilippov commented Oct 25, 2024

I would also love for this command to be available with ability to rename the theme at the same time.

A use case could be, making a backup before deploying changes via CI/CD.

Something like ⤵︎

shopify theme duplicate --environment production --rename-to "📦 Pre Deployment Backup"

Bonus points:

If it could return a theme id in some way, so we can use automate something like ⤵︎

  • duplicate a theme -> outputs new theme id
  • Use theme id to run test suite against it
  • Use theme id to delete it

Just a thought 💡

@nboliver-ventureweb
Copy link

This should absolutely be a feature of the CLI.
As @mgrbec noted, if it ever does get implemented it's imperative that translations are copied over, the same way they are when using the duplicate button in Shopify admin (related issue: #4486)

@ishevch
Copy link

ishevch commented Dec 5, 2024

Agreed, setting up our CI/CD pipelines right now and surprised this is not a feature of the CLI.

@mcarter-astronautdev
Copy link

Another vote for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: @shopify/theme @shopify/theme package issues Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests