shopify-cli 1.0.2 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +3 -2
  3. data/CHANGELOG.md +20 -0
  4. data/Gemfile +1 -1
  5. data/Gemfile.lock +13 -13
  6. data/bin/load_shopify.rb +3 -1
  7. data/bin/shopify +2 -0
  8. data/docs/Gemfile.lock +23 -13
  9. data/docs/getting-started/index.md +3 -2
  10. data/docs/getting-started/install/index.md +55 -9
  11. data/docs/getting-started/uninstall/index.md +1 -1
  12. data/docs/getting-started/upgrade/index.md +8 -4
  13. data/ext/shopify-cli/extconf.rb +40 -20
  14. data/lib/project_types/extension/cli.rb +1 -1
  15. data/lib/project_types/extension/commands/build.rb +1 -1
  16. data/lib/project_types/extension/models/type.rb +1 -0
  17. data/lib/project_types/extension/tasks/create_extension.rb +1 -1
  18. data/lib/project_types/extension/tasks/get_app.rb +1 -1
  19. data/lib/project_types/extension/tasks/update_draft.rb +1 -1
  20. data/lib/project_types/node/commands/create.rb +4 -4
  21. data/lib/project_types/node/commands/deploy/heroku.rb +6 -1
  22. data/lib/project_types/node/commands/generate/billing.rb +7 -5
  23. data/lib/project_types/node/commands/generate/page.rb +9 -5
  24. data/lib/project_types/node/commands/generate/webhook.rb +5 -1
  25. data/lib/project_types/node/messages/messages.rb +1 -0
  26. data/lib/project_types/rails/cli.rb +0 -1
  27. data/lib/project_types/rails/commands/create.rb +52 -4
  28. data/lib/project_types/rails/commands/generate.rb +1 -0
  29. data/lib/project_types/rails/commands/generate/webhook.rb +3 -2
  30. data/lib/project_types/rails/commands/serve.rb +6 -2
  31. data/lib/project_types/rails/gem.rb +61 -6
  32. data/lib/project_types/rails/messages/messages.rb +27 -11
  33. data/lib/project_types/script/cli.rb +2 -3
  34. data/lib/project_types/script/commands/create.rb +5 -9
  35. data/lib/project_types/script/commands/disable.rb +4 -15
  36. data/lib/project_types/script/commands/enable.rb +37 -13
  37. data/lib/project_types/script/commands/push.rb +8 -13
  38. data/lib/project_types/script/config/extension_points.yml +9 -3
  39. data/lib/project_types/script/errors.rb +8 -0
  40. data/lib/project_types/script/forms/create.rb +1 -1
  41. data/lib/project_types/script/layers/application/create_script.rb +7 -6
  42. data/lib/project_types/script/layers/application/disable_script.rb +9 -7
  43. data/lib/project_types/script/layers/application/enable_script.rb +11 -9
  44. data/lib/project_types/script/layers/application/push_script.rb +6 -4
  45. data/lib/project_types/script/layers/domain/errors.rb +2 -0
  46. data/lib/project_types/script/layers/infrastructure/assemblyscript_project_creator.rb +2 -2
  47. data/lib/project_types/script/layers/infrastructure/assemblyscript_task_runner.rb +1 -1
  48. data/lib/project_types/script/layers/infrastructure/errors.rb +2 -0
  49. data/lib/project_types/script/layers/infrastructure/script_service.rb +8 -2
  50. data/lib/project_types/script/messages/messages.rb +25 -31
  51. data/lib/project_types/script/script_project.rb +6 -2
  52. data/lib/project_types/script/templates/ts/as-pect.config.js +6 -0
  53. data/lib/project_types/script/ui/error_handler.rb +8 -0
  54. data/lib/project_types/script/ui/printing_spinner.rb +75 -0
  55. data/lib/rubygems_plugin.rb +18 -10
  56. data/lib/shopify-cli/admin_api/populate_resource_command.rb +1 -1
  57. data/lib/shopify-cli/admin_api/schema.rb +20 -18
  58. data/lib/shopify-cli/command.rb +14 -11
  59. data/lib/shopify-cli/commands.rb +1 -0
  60. data/lib/shopify-cli/commands/config.rb +44 -0
  61. data/lib/shopify-cli/commands/connect.rb +8 -69
  62. data/lib/shopify-cli/commands/create.rb +2 -2
  63. data/lib/shopify-cli/commands/help.rb +1 -1
  64. data/lib/shopify-cli/commands/system.rb +22 -13
  65. data/lib/shopify-cli/context.rb +28 -0
  66. data/lib/shopify-cli/core.rb +0 -1
  67. data/lib/shopify-cli/core/entry_point.rb +1 -1
  68. data/lib/shopify-cli/core/executor.rb +3 -5
  69. data/lib/shopify-cli/core/monorail.rb +1 -1
  70. data/lib/shopify-cli/db.rb +1 -1
  71. data/lib/shopify-cli/feature.rb +97 -0
  72. data/lib/shopify-cli/heroku.rb +21 -5
  73. data/lib/shopify-cli/js_deps.rb +2 -2
  74. data/lib/shopify-cli/js_system.rb +2 -2
  75. data/lib/shopify-cli/messages/messages.rb +40 -12
  76. data/lib/shopify-cli/partners_api/organizations.rb +7 -7
  77. data/lib/shopify-cli/process_supervision.rb +60 -21
  78. data/lib/shopify-cli/project.rb +14 -6
  79. data/lib/shopify-cli/project_type.rb +5 -7
  80. data/lib/shopify-cli/sub_command.rb +1 -0
  81. data/lib/shopify-cli/task.rb +2 -2
  82. data/lib/shopify-cli/tasks.rb +11 -4
  83. data/lib/shopify-cli/tasks/ensure_env.rb +72 -16
  84. data/lib/shopify-cli/tasks/update_dashboard_urls.rb +4 -3
  85. data/lib/shopify-cli/tunnel.rb +53 -14
  86. data/lib/shopify-cli/version.rb +1 -1
  87. data/lib/shopify_cli.rb +36 -9
  88. data/shopify-cli.gemspec +4 -1
  89. data/vendor/deps/cli-kit/REVISION +1 -1
  90. data/vendor/deps/cli-kit/lib/cli/kit.rb +1 -1
  91. data/vendor/deps/cli-kit/lib/cli/kit/autocall.rb +2 -2
  92. data/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb +12 -6
  93. data/vendor/deps/cli-kit/lib/cli/kit/executor.rb +9 -11
  94. data/vendor/deps/cli-kit/lib/cli/kit/logger.rb +8 -2
  95. data/vendor/deps/cli-kit/lib/cli/kit/support/test_helper.rb +7 -7
  96. data/vendor/deps/cli-kit/lib/cli/kit/system.rb +48 -17
  97. data/vendor/deps/cli-ui/REVISION +1 -1
  98. data/vendor/deps/cli-ui/lib/cli/ui.rb +5 -4
  99. data/vendor/deps/cli-ui/lib/cli/ui/ansi.rb +9 -3
  100. data/vendor/deps/cli-ui/lib/cli/ui/color.rb +1 -0
  101. data/vendor/deps/cli-ui/lib/cli/ui/frame.rb +3 -2
  102. data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style.rb +1 -0
  103. data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/box.rb +13 -5
  104. data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/bracket.rb +29 -2
  105. data/vendor/deps/cli-ui/lib/cli/ui/glyph.rb +21 -10
  106. data/vendor/deps/cli-ui/lib/cli/ui/os.rb +63 -0
  107. data/vendor/deps/cli-ui/lib/cli/ui/prompt.rb +11 -2
  108. data/vendor/deps/cli-ui/lib/cli/ui/prompt/interactive_options.rb +1 -0
  109. data/vendor/deps/cli-ui/lib/cli/ui/spinner.rb +3 -3
  110. data/vendor/deps/cli-ui/lib/cli/ui/spinner/spin_group.rb +6 -8
  111. data/vendor/deps/cli-ui/lib/cli/ui/widgets.rb +2 -0
  112. data/vendor/gen/lib/gen.rb +39 -0
  113. data/vendor/gen/lib/gen/commands.rb +18 -0
  114. data/vendor/gen/lib/gen/commands/help.rb +20 -0
  115. data/vendor/gen/lib/gen/commands/new.rb +21 -0
  116. data/vendor/gen/lib/gen/entry_point.rb +10 -0
  117. data/vendor/gen/lib/gen/generator.rb +165 -0
  118. data/vendor/gen/template/.gitignore +2 -0
  119. data/vendor/gen/template/Gemfile +10 -0
  120. data/vendor/gen/template/README.md +1 -0
  121. data/vendor/gen/template/bin/testunit +23 -0
  122. data/vendor/gen/template/bin/update-deps +97 -0
  123. data/vendor/gen/template/dev-gems.yml +3 -0
  124. data/vendor/gen/template/dev-vendor.yml +4 -0
  125. data/vendor/gen/template/exe/__app__-gems +17 -0
  126. data/vendor/gen/template/exe/__app__-vendor +18 -0
  127. data/vendor/gen/template/lib/__app__.rb +33 -0
  128. data/vendor/gen/template/lib/__app__/commands.rb +18 -0
  129. data/vendor/gen/template/lib/__app__/commands/example.rb +19 -0
  130. data/vendor/gen/template/lib/__app__/commands/help.rb +21 -0
  131. data/vendor/gen/template/lib/__app__/entry_point.rb +10 -0
  132. data/vendor/gen/template/test/example_test.rb +17 -0
  133. data/vendor/gen/template/test/test_helper.rb +22 -0
  134. metadata +28 -6
  135. data/Vagrantfile +0 -17
  136. data/lib/project_types/script/forms/enable.rb +0 -24
  137. data/lib/project_types/script/forms/push.rb +0 -19
  138. data/lib/project_types/script/forms/script_form.rb +0 -66
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3355ade46f06f8fad98098842f7b68bb0a154a53921a498ca4aba18379512ff6
4
- data.tar.gz: 57617469febb8905d737a9991f4da4a578e0f87bc8cad17bfc3d674e28cd40c2
3
+ metadata.gz: 8765adff2578420b0bbaaf7aa30e7e3f6b28b20363671f9e64a419f8b97fe647
4
+ data.tar.gz: 17e00973e6c881c58c1e0ade838a98e93a17a39f7d960261a36f9cdc74a87940
5
5
  SHA512:
6
- metadata.gz: a71cd8e3f4f9409f0c527ab6da9152e592d7cd1be173d9fe4e1499713998cf245541504151a1e63fa5901cf0c83b1d41302bc6628defff86042908b5e63d37af
7
- data.tar.gz: 2d16c25b44bd21abbcd154abd0ff5d3b3e9e464b7c89377b523299855800cd65bf3357d89b3d92d8a66137e8316d64de755263a1bc21f30df1c5ad3b8e492492
6
+ metadata.gz: '08b07fe290962b6ba6416214165dde7d9c78d01c7eade8662917ec530af18af1a773b08957c58be5b6c10c733bd4be8e2c40a24c2241153d575a158d3988bb84'
7
+ data.tar.gz: 171f11dd5a4e740cb91345ed51e10485f9499e328bc6dec0ab3027c415b35fd312b616c451137639c224c07862d8651836074ef5bbb85563229ca93d85aa944a
@@ -1,7 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.4.7
4
- - 2.5.1
3
+ - 2.5.8
4
+ - 2.6.6
5
+ - 2.7.1
5
6
  before_install:
6
7
  - gem install bundler -v '1.17.3'
7
8
  cache:
@@ -1,3 +1,23 @@
1
+ Version 1.1.1
2
+ ------
3
+ * Fix a bug where usernames with spaces caused issues on Windows
4
+
5
+ Version 1.1.0
6
+ ------
7
+ * Add native Windows 10 support, including variety of stability fixes.
8
+
9
+ Version 1.0.5
10
+ ------
11
+ * Fix a bug in out opt-in metrics
12
+
13
+ Version 1.0.4
14
+ ------
15
+ * Fix a bug when running the `connect` command with an account with multiple organizations
16
+
17
+ Version 1.0.3
18
+ ------
19
+ * Fix a bug which causes an error in the `populate` and `generate` commands when prompting for the shop name
20
+
1
21
  Version 1.0.2
2
22
  ------
3
23
  * Fix missing shop parameter to AdminAPI.query() call (impacting populate and generate commands)
data/Gemfile CHANGED
@@ -16,7 +16,7 @@ group :test do
16
16
  gem 'mocha', require: false
17
17
  gem 'minitest', '>= 5.0.0', require: false
18
18
  gem 'minitest-reporters', require: false
19
- gem 'fakefs', require: false
19
+ gem 'fakefs', '>= 1.0', require: false
20
20
  gem 'webmock', require: false
21
21
  gem 'timecop', require: false
22
22
  end
@@ -4,13 +4,13 @@ GEM
4
4
  addressable (2.5.2)
5
5
  public_suffix (>= 2.0.2, < 4.0)
6
6
  ansi (1.5.0)
7
- ast (2.4.0)
7
+ ast (2.4.1)
8
8
  builder (3.2.3)
9
- byebug (8.2.2)
9
+ byebug (8.2.5)
10
10
  coderay (1.1.2)
11
11
  crack (0.4.3)
12
12
  safe_yaml (~> 1.0.0)
13
- fakefs (0.20.0)
13
+ fakefs (1.2.2)
14
14
  hashdiff (0.3.2)
15
15
  metaclass (0.0.4)
16
16
  method_source (0.9.2)
@@ -22,9 +22,9 @@ GEM
22
22
  ruby-progressbar
23
23
  mocha (1.7.0)
24
24
  metaclass (~> 0.0.1)
25
- parallel (1.19.1)
26
- parser (2.7.1.3)
27
- ast (~> 2.4.0)
25
+ parallel (1.19.2)
26
+ parser (2.7.1.4)
27
+ ast (~> 2.4.1)
28
28
  pry (0.12.2)
29
29
  coderay (~> 1.1.0)
30
30
  method_source (~> 0.9.0)
@@ -34,19 +34,19 @@ GEM
34
34
  public_suffix (3.0.3)
35
35
  rainbow (3.0.0)
36
36
  rake (13.0.1)
37
- regexp_parser (1.7.0)
37
+ regexp_parser (1.7.1)
38
38
  rexml (3.2.4)
39
- rubocop (0.85.0)
39
+ rubocop (0.89.1)
40
40
  parallel (~> 1.10)
41
- parser (>= 2.7.0.1)
41
+ parser (>= 2.7.1.1)
42
42
  rainbow (>= 2.2.2, < 4.0)
43
43
  regexp_parser (>= 1.7)
44
44
  rexml
45
- rubocop-ast (>= 0.0.3)
45
+ rubocop-ast (>= 0.3.0, < 1.0)
46
46
  ruby-progressbar (~> 1.7)
47
47
  unicode-display_width (>= 1.4.0, < 2.0)
48
- rubocop-ast (0.0.3)
49
- parser (>= 2.7.0.1)
48
+ rubocop-ast (0.3.0)
49
+ parser (>= 2.7.1.4)
50
50
  ruby-progressbar (1.10.1)
51
51
  safe_yaml (1.0.4)
52
52
  session (3.2.0)
@@ -62,7 +62,7 @@ PLATFORMS
62
62
 
63
63
  DEPENDENCIES
64
64
  byebug
65
- fakefs
65
+ fakefs (>= 1.0)
66
66
  minitest (>= 5.0.0)
67
67
  minitest-reporters
68
68
  mocha
@@ -9,7 +9,9 @@ ENV['USER_PWD'] ||= Dir.pwd
9
9
  # Prune non-absolute paths from PATH to prevent non-deterministic behavior
10
10
  # i.e. If user has "." or "./bin" in their PATH
11
11
  # Note that this logic is duplicated in lib/shopify.rb
12
- ENV['PATH'] = ENV['PATH'].split(':').select { |p| p.start_with?('/', '~') }.join(':')
12
+ ENV['PATH'] = ENV['PATH'].split(File::PATH_SEPARATOR).select do |p|
13
+ p.start_with?('/', '~', /[A-Z]:\\/)
14
+ end.join(File::PATH_SEPARATOR)
13
15
 
14
16
  $original_env = ENV.to_hash
15
17
 
@@ -8,6 +8,8 @@ module Kernel
8
8
  def require(name)
9
9
  original_require(name)
10
10
  rescue LoadError => e
11
+ # Special case for readline.so, which fails harmlessly on Windows
12
+ raise if (name == "readline.so") && ShopifyCli::Context.new.windows?
11
13
  # Special case for psych (yaml), which rescues this itself
12
14
  raise if name == "#{RUBY_VERSION[/\d+\.\d+/]}/psych.so"
13
15
  STDERR.puts "[Note] You cannot use gems with Shopify App CLI."
@@ -1,7 +1,7 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- activesupport (6.0.3.1)
4
+ activesupport (6.0.3.2)
5
5
  concurrent-ruby (~> 1.0, >= 1.0.2)
6
6
  i18n (>= 0.7, < 2)
7
7
  minitest (~> 5.1)
@@ -16,9 +16,9 @@ GEM
16
16
  colorator (1.1.0)
17
17
  commonmarker (0.17.13)
18
18
  ruby-enum (~> 0.5)
19
- concurrent-ruby (1.1.6)
20
- dnsruby (1.61.3)
21
- addressable (~> 2.5)
19
+ concurrent-ruby (1.1.7)
20
+ dnsruby (1.61.4)
21
+ simpleidn (~> 0.1)
22
22
  em-websocket (0.5.1)
23
23
  eventmachine (>= 0.12.9)
24
24
  http_parser.rb (~> 0.6.0)
@@ -28,12 +28,12 @@ GEM
28
28
  execjs (2.7.0)
29
29
  faraday (1.0.1)
30
30
  multipart-post (>= 1.2, < 3)
31
- ffi (1.13.0)
31
+ ffi (1.13.1)
32
32
  forwardable-extended (2.6.0)
33
33
  gemoji (3.0.1)
34
- github-pages (206)
34
+ github-pages (207)
35
35
  github-pages-health-check (= 1.16.1)
36
- jekyll (= 3.8.7)
36
+ jekyll (= 3.9.0)
37
37
  jekyll-avatar (= 0.7.0)
38
38
  jekyll-coffeescript (= 1.1.1)
39
39
  jekyll-commonmark-ghpages (= 0.1.6)
@@ -67,7 +67,8 @@ GEM
67
67
  jekyll-theme-time-machine (= 0.1.1)
68
68
  jekyll-titles-from-headings (= 0.5.3)
69
69
  jemoji (= 0.11.1)
70
- kramdown (= 1.17.0)
70
+ kramdown (= 2.3.0)
71
+ kramdown-parser-gfm (= 1.1.0)
71
72
  liquid (= 4.0.3)
72
73
  mercenary (~> 0.3)
73
74
  minima (= 2.5.1)
@@ -86,14 +87,14 @@ GEM
86
87
  http_parser.rb (0.6.0)
87
88
  i18n (0.9.5)
88
89
  concurrent-ruby (~> 1.0)
89
- jekyll (3.8.7)
90
+ jekyll (3.9.0)
90
91
  addressable (~> 2.4)
91
92
  colorator (~> 1.0)
92
93
  em-websocket (~> 0.5)
93
94
  i18n (~> 0.7)
94
95
  jekyll-sass-converter (~> 1.0)
95
96
  jekyll-watch (~> 2.0)
96
- kramdown (~> 1.14)
97
+ kramdown (>= 1.17, < 3)
97
98
  liquid (~> 4.0)
98
99
  mercenary (~> 0.3.3)
99
100
  pathutil (~> 0.9)
@@ -191,7 +192,10 @@ GEM
191
192
  gemoji (~> 3.0)
192
193
  html-pipeline (~> 2.2)
193
194
  jekyll (>= 3.0, < 5.0)
194
- kramdown (1.17.0)
195
+ kramdown (2.3.0)
196
+ rexml
197
+ kramdown-parser-gfm (1.1.0)
198
+ kramdown (~> 2.0)
195
199
  liquid (4.0.3)
196
200
  listen (3.2.1)
197
201
  rb-fsevent (~> 0.10, >= 0.10.3)
@@ -204,7 +208,7 @@ GEM
204
208
  jekyll-seo-tag (~> 2.1)
205
209
  minitest (5.14.1)
206
210
  multipart-post (2.1.1)
207
- nokogiri (1.10.9)
211
+ nokogiri (1.10.10)
208
212
  mini_portile2 (~> 2.4.0)
209
213
  octokit (4.18.0)
210
214
  faraday (>= 0.9)
@@ -215,6 +219,7 @@ GEM
215
219
  rb-fsevent (0.10.4)
216
220
  rb-inotify (0.10.1)
217
221
  ffi (~> 1.0)
222
+ rexml (3.2.4)
218
223
  rouge (3.19.0)
219
224
  ruby-enum (0.8.0)
220
225
  i18n
@@ -228,6 +233,8 @@ GEM
228
233
  sawyer (0.8.2)
229
234
  addressable (>= 2.3.5)
230
235
  faraday (> 0.8, < 2.0)
236
+ simpleidn (0.1.1)
237
+ unf (~> 0.1.4)
231
238
  terminal-table (1.8.0)
232
239
  unicode-display_width (~> 1.1, >= 1.1.1)
233
240
  thread_safe (0.3.6)
@@ -235,8 +242,11 @@ GEM
235
242
  ethon (>= 0.9.0)
236
243
  tzinfo (1.2.7)
237
244
  thread_safe (~> 0.1)
245
+ unf (0.1.4)
246
+ unf_ext
247
+ unf_ext (0.0.7.7)
238
248
  unicode-display_width (1.7.0)
239
- zeitwerk (2.3.0)
249
+ zeitwerk (2.4.0)
240
250
 
241
251
  PLATFORMS
242
252
  ruby
@@ -8,14 +8,15 @@ Developers should have some prior knowledge of the [Shopify app ecosystem](https
8
8
 
9
9
  ## Requirements
10
10
 
11
- - [Ruby](https://www.ruby-lang.org) 2.5.1+
12
11
  - A [Shopify partner account](https://partners.shopify.com/signup)
13
12
  - A [Shopify development store](https://help.shopify.com/en/partners/dashboard/development-stores#create-a-development-store) to install and test apps
13
+ - [Ruby](https://www.ruby-lang.org) 2.5.1+
14
14
 
15
15
  ### Windows requirements
16
16
 
17
- You’ll need to install the following tools to use Shopify App CLI on Windows:
17
+ If you wish to use Shopify App CLI natively on **Windows 10**, we recommend installing Ruby using [RubyInstaller for Windows](https://rubyinstaller.org/downloads/).
18
18
 
19
+ Alternatively, you can also use Shopify App CLI using **Windows Subsystem for Linux**, in which case you need:
19
20
  - [Linux Subsystem for Windows](https://docs.microsoft.com/en-us/windows/wsl/install-win10)
20
21
  - [Ubuntu VM](https://www.microsoft.com/en-ca/p/ubuntu/9nblggh4msv6)
21
22
 
@@ -5,9 +5,15 @@ toc: false
5
5
  redirect_from: "/install/"
6
6
  ---
7
7
 
8
- Shopify App CLI can be installed using a variety of package managers.
8
+ Shopify App CLI can be installed on a variety of systems, using a variety of package managers.
9
+ > Note that for systems that have multiple installation options, you only need to use one of these methods to install.
9
10
 
10
- ### Homebrew (macOS)
11
+ ---
12
+ ### macOS
13
+
14
+ Shopify App CLI is available through Homebrew _or_ RubyGems.
15
+
16
+ **Homebrew**
11
17
 
12
18
  You’ll need to run `brew tap` first to add Shopify’s third-party repositories to Homebrew.
13
19
 
@@ -16,28 +22,68 @@ $ brew tap shopify/shopify
16
22
  $ brew install shopify-cli
17
23
  ```
18
24
 
19
- ### apt (Debian, Ubuntu)
25
+ **RubyGems**
26
+
27
+ See the [RubyGems]({{ site.baseurl }}/getting-started/install/#rubygems-all-platforms) section for further details.
28
+
29
+ ---
30
+
31
+ ### Debian/Ubuntu Linux
20
32
 
21
- You’ll need to install a downloaded .deb file with an explicit version number. Check the [releases page](https://github.com/Shopify/shopify-app-cli/releases) to make sure you install the latest package.
33
+ On Debian-based Linux systems, Shopify App CLI is available through the `apt` command _or_ RubyGems.
22
34
 
35
+ **apt**
36
+
37
+ You’ll need to install a downloaded `.deb` file with an explicit version number. Check the [releases page](https://github.com/Shopify/shopify-app-cli/releases) to make sure you install the latest package.
38
+
39
+ 1. Download the `.deb` file from the [releases page](https://github.com/Shopify/shopify-app-cli/releases)
40
+ 1. Install the downloaded file
23
41
  ```console
24
- $ sudo apt install shopify-cli-x.y.z.deb
42
+ $ sudo apt install /path/to/downloaded/shopify-cli-x.y.z.deb
25
43
  ```
26
44
 
27
- ### yum (CentOS 8+, Fedora, Red Hat, SUSE)
45
+ **RubyGems**
46
+
47
+ See the [RubyGems]({{ site.baseurl }}/getting-started/install/#rubygems-all-platforms) section for further details.
48
+
49
+ ---
50
+
51
+ ### CentOS 8+/Fedora/Red Hat/SUSE Linux
28
52
 
29
- You’ll need to install a downloaded .rpm file with an explicit version number. Check the [releases page](https://github.com/Shopify/shopify-app-cli/releases) to make sure you install the latest package.
53
+ On RPM-based Linux systems, Shopify App CLI is available through the `yum` command _or_ RubyGems.
30
54
 
55
+ **yum**
56
+
57
+ You’ll need to install a downloaded `.rpm` file with an explicit version number. Check the [releases page](https://github.com/Shopify/shopify-app-cli/releases) to make sure you install the latest package.
58
+
59
+ 1. Download the `.rpm` file from the [releases page](https://github.com/Shopify/shopify-app-cli/releases)
60
+ 1. Install the downloaded file
31
61
  ```console
32
- $ sudo yum install shopify-cli-x.y.x.rpm
62
+ $ sudo yum install /path/to/downloaded/shopify-cli-x.y.x.rpm
33
63
  ```
34
64
 
35
- ### Ruby gem
65
+ **RubyGems**
66
+
67
+ See the [RubyGems]({{ site.baseurl }}/getting-started/install/#rubygems-all-platforms) section for further details.
68
+
69
+ ---
70
+
71
+ ### Windows 10
72
+
73
+ On Windows 10 systems, Shopify App CLI is available through [RubyGems]({{ site.baseurl }}/getting-started/install/#rubygem-all-platforms).
74
+
75
+ ---
76
+
77
+ ### RubyGems (all platforms)
78
+
79
+ Shopify App CLI is available on all platforms as a RubyGem through [RubyGems.org](https://rubygems.org/).
36
80
 
37
81
  ```console
38
82
  $ gem install shopify-cli
39
83
  ```
40
84
 
85
+ ---
86
+
41
87
  ### To check that Shopify App CLI is installed correctly:
42
88
 
43
89
  ```console
@@ -25,7 +25,7 @@ $ sudo apt remove shopify-cli
25
25
  $ sudo yum remove shopify-cli
26
26
  ```
27
27
 
28
- ### Ruby gem
28
+ ### RubyGems (macOS, Linux, Windows 10)
29
29
 
30
30
  ```console
31
31
  $ gem uninstall shopify-cli
@@ -5,7 +5,7 @@ toc: false
5
5
  redirect_from: "/upgrade/"
6
6
  ---
7
7
 
8
- You can manage upgrades to Shopify App CLI with the package manager for your platform.
8
+ You can manage upgrades to Shopify App CLI with the package manager for your platform. **Note** that it's important to use the same package manager to upgrade that you originally used to install Shopify App CLI.
9
9
 
10
10
  ### Homebrew (macOS)
11
11
 
@@ -18,19 +18,23 @@ $ brew upgrade shopify-cli
18
18
 
19
19
  On Debian-based Linux distributions, download the latest `.deb` file for Shopify App CLI from the [releases page](https://github.com/Shopify/shopify-app-cli/releases) and install it to update.
20
20
 
21
+ 1. Download the `.deb` file from the [releases page](https://github.com/Shopify/shopify-app-cli/releases)
22
+ 1. Install the downloaded file
21
23
  ```console
22
- $ sudo apt install shopify-cli-x.y.z.deb
24
+ $ sudo apt install /path/to/downloaded/shopify-cli-x.y.z.deb
23
25
  ```
24
26
 
25
27
  ### yum (CentOS 8+, Fedora, Red Hat, SUSE)
26
28
 
27
29
  On Red Hat–based Linux distributions, download the latest `.rpm` file for Shopify App CLI from the [releases page](https://github.com/Shopify/shopify-app-cli/releases) and install it to update.
28
30
 
31
+ 1. Download the `.rpm` file from the [releases page](https://github.com/Shopify/shopify-app-cli/releases)
32
+ 1. Install the downloaded file
29
33
  ```console
30
- $ sudo yum install shopify-cli-x.y.z.rpm
34
+ $ sudo yum install /path/to/downloaded/shopify-cli-x.y.x.rpm
31
35
  ```
32
36
 
33
- ### Ruby gem
37
+ ### RubyGems (macOS, Linux, Windows 10)
34
38
 
35
39
  ```console
36
40
  $ gem update shopify-cli
@@ -3,25 +3,45 @@ require 'fileutils'
3
3
 
4
4
  gem = File.expand_path('../../../', __FILE__)
5
5
  exe = File.join(gem, 'bin', 'shopify')
6
- script = exe + '.sh'
7
- symlink = '/usr/local/bin/shopify'
8
-
9
- script_content = <<~SCRIPT
10
- #!/usr/bin/env bash
11
- #{RbConfig.ruby} --disable=gems -I #{gem} #{exe} $@
12
- SCRIPT
13
-
14
- File.write(script, script_content)
15
- FileUtils.chmod("+x", script)
16
-
17
- makefile_content = <<~MAKEFILE
18
- .PHONY: clean install
19
-
20
- clean:
21
- \t@sudo rm -f #{symlink}
22
-
23
- install: clean
24
- \t@sudo ln -s #{script} #{symlink}
25
- MAKEFILE
6
+
7
+ if RUBY_PLATFORM.match(/mingw32/)
8
+ bat_path = File.dirname(RbConfig.ruby)
9
+ bat = "#{bat_path}\\shopify.bat"
10
+
11
+ script_content = "#{RbConfig.ruby} --disable=gems -I '#{gem}' '#{exe}' %*"
12
+
13
+ FileUtils.mkdir_p(bat_path)
14
+ makefile_content = <<~MAKEFILE
15
+ .PHONY: clean install
16
+
17
+ clean:
18
+ \t rm -f "#{bat}"
19
+
20
+ install: clean
21
+ \t echo "@ECHO OFF"> "#{bat}"
22
+ \t echo "#{script_content}">> "#{bat}"
23
+ MAKEFILE
24
+ else
25
+ script = exe + '.sh'
26
+ symlink = '/usr/local/bin/shopify'
27
+
28
+ script_content = <<~SCRIPT
29
+ #!/usr/bin/env bash
30
+ #{RbConfig.ruby} --disable=gems -I #{gem} #{exe} $@
31
+ SCRIPT
32
+
33
+ File.write(script, script_content)
34
+ FileUtils.chmod("+x", script)
35
+
36
+ makefile_content = <<~MAKEFILE
37
+ .PHONY: clean install
38
+
39
+ clean:
40
+ \t@sudo rm -f #{symlink}
41
+
42
+ install: clean
43
+ \t@sudo ln -s #{script} #{symlink}
44
+ MAKEFILE
45
+ end
26
46
 
27
47
  File.write('Makefile', makefile_content)