Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Introduce hidden --overwrite-json flag#2724

Merged
Poitrin merged 1 commit intomainfrom
fix-509
Jan 30, 2023
Merged

Introduce hidden --overwrite-json flag#2724
Poitrin merged 1 commit intomainfrom
fix-509

Conversation

@Poitrin
Copy link
Copy Markdown
Contributor

@Poitrin Poitrin commented Jan 27, 2023

WHY are these changes introduced?

Part of https://github.com/Shopify/internal-cli-foundations/issues/509
Is required by Shopify/cli#1169

Issue #2433 was fixed with #2463.
With Shopify/cli#1169, Node CLI needs to pass Ruby CLI a hidden flag to differentiate themes created at runtime.

WHAT is this pull request doing?

Introduces --overwrite-json flag that Node CLI can pass to Ruby CLI.

How to test your changes?

  1. In lib/shopify_cli/theme/theme.rb, remove the line @created_at_runtime = true, because theme will already have been created by Node CLI.
  2. Make sure that your current store has 0 development themes.
  3. Execute shopify(-dev) theme serve /path/to/theme --theme-editor-sync
  4. Verify that CLI asks "Keep the remote version".
  5. Exit the prompt.
  6. Delete the development theme that has been created.
  7. Execute shopify(-dev) theme serve /path/to/theme --theme-editor-sync --overwrite-json
  8. Verify that CLI does not display any prompt.

Post-release steps

Update checklist

  • I've added a CHANGELOG entry for this PR (if the change is public-facing)
  • I've considered possible cross-platform impacts (Mac, Linux, Windows).
  • I've left the version number as is (we'll handle incrementing this when releasing).
  • I've included any post-release steps in the section above (if needed).

@Poitrin Poitrin changed the title Introduce --overwrite-json flag Introduce hidden --overwrite-json flag Jan 27, 2023
@Poitrin Poitrin marked this pull request as ready for review January 27, 2023 10:01
@Poitrin Poitrin requested review from a team, gonzaloriestra and matteodepalo and removed request for a team January 27, 2023 10:01
Copy link
Copy Markdown
Contributor

@karreiro karreiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @Poitrin!

@Poitrin Poitrin merged commit 524f89b into main Jan 30, 2023
@Poitrin Poitrin deleted the fix-509 branch January 30, 2023 07:28
Poitrin pushed a commit to Shopify/cli that referenced this pull request Feb 6, 2023
…hemes (#1169)

### WHY are these changes introduced?

Fixes https://github.com/Shopify/internal-cli-foundations/issues/509
Fixes #1084
Fixes #1263

Requires Shopify/shopify-cli#2724

### WHAT is this pull request doing?

* Generates Development Theme ID and calls Themes API in Node.js CLI.
* Depending on the `shopify theme` command: passes ID of generated theme to Ruby CLI for further processing.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants