Skip to content

Commit 846c1eb

Browse files
authored
Merge pull request #6103 from Shopify/rb-update-store-copy-help-content
Update store copy help content and add examples
2 parents 1374c93 + 70d147f commit 846c1eb

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

packages/cli/oclif.manifest.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4878,10 +4878,10 @@
48784878
"args": {
48794879
},
48804880
"customPluginName": "@shopify/store",
4881-
"description": "Copy data between stores, export store data to SQLite, or import data from SQLite to a store",
4881+
"description": "Examples:\n\n COPY data from one store to another in your organization\n shopify store copy --from-store source.myshopify.com --to-store target.myshopify.com\n\n EXPORT store data to SQLite\n shopify store copy --from-store source.myshopify.com --to-file path/to/file.sqlite\n\n IMPORT data from SQLite to a store\n shopify store copy --from-file path/to/file.sqlite --to-store target.myshopify.com\n",
48824882
"flags": {
48834883
"from-file": {
4884-
"description": "The SQLite file to import data from.",
4884+
"description": "The SQLite file to import data from. Can't be used with --to-file.",
48854885
"env": "SHOPIFY_FLAG_FROM_FILE",
48864886
"hasDynamicHelp": false,
48874887
"multiple": false,
@@ -4902,7 +4902,7 @@
49024902
"default": [
49034903
"products:handle"
49044904
],
4905-
"description": "The identity key to use to match resources",
4905+
"description": "The identity key to use to match resources. ID metafields can be specified as <object_type>:metafield:<metafield_namespace>:<key>",
49064906
"env": "SHOPIFY_FLAG_IDENTITY_KEY",
49074907
"hasDynamicHelp": false,
49084908
"multiple": true,
@@ -4938,7 +4938,7 @@
49384938
"type": "boolean"
49394939
},
49404940
"to-file": {
4941-
"description": "The SQLite file path to export data to. Omit to auto-generate filename.",
4941+
"description": "The SQLite file path to export data to. Omit to auto-generate filename. Can't be used with --from-file.",
49424942
"env": "SHOPIFY_FLAG_TO_FILE",
49434943
"hasDynamicHelp": false,
49444944
"multiple": false,

packages/store/src/commands/store/copy.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,18 @@ import {loadHelpClass} from '@oclif/core'
1414

1515
export default class Copy extends BaseBDCommand {
1616
static summary = 'Copy, export, or import store data'
17-
static description = 'Copy data between stores, export store data to SQLite, or import data from SQLite to a store'
17+
static description = `Examples:
18+
19+
COPY data from one store to another in your organization
20+
shopify store copy --from-store source.myshopify.com --to-store target.myshopify.com
21+
22+
EXPORT store data to SQLite
23+
shopify store copy --from-store source.myshopify.com --to-file path/to/file.sqlite
24+
25+
IMPORT data from SQLite to a store
26+
shopify store copy --from-file path/to/file.sqlite --to-store target.myshopify.com
27+
`
28+
1829
static hidden = true
1930
static flags = {
2031
...storeFlags,

packages/store/src/lib/flags.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ export const storeFlags = {
1515

1616
export const fileFlags = {
1717
'from-file': Flags.string({
18-
description: 'The SQLite file to import data from.',
18+
description: "The SQLite file to import data from. Can't be used with --to-file.",
1919
required: false,
2020
env: 'SHOPIFY_FLAG_FROM_FILE',
2121
}),
2222
'to-file': Flags.string({
23-
description: 'The SQLite file path to export data to. Omit to auto-generate filename.',
23+
description:
24+
"The SQLite file path to export data to. Omit to auto-generate filename. Can't be used with --from-file.",
2425
required: false,
2526
env: 'SHOPIFY_FLAG_TO_FILE',
2627
default: undefined,
@@ -29,7 +30,8 @@ export const fileFlags = {
2930

3031
export const resourceConfigFlags = {
3132
key: Flags.string({
32-
description: 'The identity key to use to match resources',
33+
description:
34+
'The identity key to use to match resources. ID metafields can be specified as <object_type>:metafield:<metafield_namespace>:<key>',
3335
multiple: true,
3436
required: false,
3537
env: 'SHOPIFY_FLAG_IDENTITY_KEY',

0 commit comments

Comments
 (0)