shopify-cli 1.0.4 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CONTRIBUTING.md +1 -1
  3. data/.travis.yml +3 -2
  4. data/CHANGELOG.md +21 -1
  5. data/Gemfile +1 -1
  6. data/Gemfile.lock +13 -13
  7. data/bin/load_shopify.rb +3 -1
  8. data/bin/shopify +2 -0
  9. data/docs/Gemfile.lock +23 -13
  10. data/docs/getting-started/index.md +3 -2
  11. data/docs/getting-started/install/index.md +55 -9
  12. data/docs/getting-started/uninstall/index.md +1 -1
  13. data/docs/getting-started/upgrade/index.md +8 -4
  14. data/ext/shopify-cli/extconf.rb +40 -20
  15. data/lib/project_types/extension/cli.rb +1 -0
  16. data/lib/project_types/extension/features/argo_config.rb +60 -0
  17. data/lib/project_types/extension/messages/messages.rb +3 -0
  18. data/lib/project_types/extension/models/type.rb +1 -0
  19. data/lib/project_types/extension/models/types/checkout_post_purchase.rb +5 -2
  20. data/lib/project_types/extension/tasks/create_extension.rb +1 -1
  21. data/lib/project_types/extension/tasks/get_app.rb +1 -1
  22. data/lib/project_types/extension/tasks/update_draft.rb +1 -1
  23. data/lib/project_types/node/commands/create.rb +4 -4
  24. data/lib/project_types/node/commands/deploy/heroku.rb +6 -1
  25. data/lib/project_types/node/commands/generate/billing.rb +7 -5
  26. data/lib/project_types/node/commands/generate/page.rb +9 -5
  27. data/lib/project_types/node/commands/generate/webhook.rb +5 -1
  28. data/lib/project_types/node/commands/serve.rb +5 -5
  29. data/lib/project_types/node/messages/messages.rb +5 -1
  30. data/lib/project_types/rails/commands/create.rb +56 -5
  31. data/lib/project_types/rails/commands/generate.rb +1 -0
  32. data/lib/project_types/rails/commands/generate/webhook.rb +3 -2
  33. data/lib/project_types/rails/commands/serve.rb +11 -7
  34. data/lib/project_types/rails/gem.rb +61 -6
  35. data/lib/project_types/rails/messages/messages.rb +32 -12
  36. data/lib/project_types/script/commands/create.rb +1 -5
  37. data/lib/project_types/script/commands/disable.rb +1 -2
  38. data/lib/project_types/script/commands/enable.rb +5 -5
  39. data/lib/project_types/script/commands/push.rb +1 -6
  40. data/lib/project_types/script/config/extension_points.yml +4 -4
  41. data/lib/project_types/script/errors.rb +8 -0
  42. data/lib/project_types/script/forms/create.rb +1 -1
  43. data/lib/project_types/script/layers/domain/errors.rb +2 -0
  44. data/lib/project_types/script/layers/infrastructure/assemblyscript_task_runner.rb +36 -1
  45. data/lib/project_types/script/layers/infrastructure/errors.rb +8 -0
  46. data/lib/project_types/script/layers/infrastructure/script_service.rb +6 -2
  47. data/lib/project_types/script/messages/messages.rb +22 -48
  48. data/lib/project_types/script/ui/error_handler.rb +12 -0
  49. data/lib/rubygems_plugin.rb +18 -10
  50. data/lib/shopify-cli/admin_api/populate_resource_command.rb +1 -1
  51. data/lib/shopify-cli/command.rb +12 -6
  52. data/lib/shopify-cli/commands/connect.rb +7 -75
  53. data/lib/shopify-cli/commands/create.rb +1 -1
  54. data/lib/shopify-cli/commands/system.rb +21 -12
  55. data/lib/shopify-cli/context.rb +68 -0
  56. data/lib/shopify-cli/core/entry_point.rb +4 -1
  57. data/lib/shopify-cli/core/executor.rb +3 -5
  58. data/lib/shopify-cli/core/monorail.rb +1 -1
  59. data/lib/shopify-cli/db.rb +1 -1
  60. data/lib/shopify-cli/git.rb +1 -1
  61. data/lib/shopify-cli/heroku.rb +21 -5
  62. data/lib/shopify-cli/js_deps.rb +2 -2
  63. data/lib/shopify-cli/js_system.rb +2 -2
  64. data/lib/shopify-cli/messages/messages.rb +35 -25
  65. data/lib/shopify-cli/process_supervision.rb +60 -21
  66. data/lib/shopify-cli/project.rb +17 -9
  67. data/lib/shopify-cli/project_type.rb +3 -2
  68. data/lib/shopify-cli/sub_command.rb +1 -0
  69. data/lib/shopify-cli/task.rb +2 -2
  70. data/lib/shopify-cli/tasks.rb +11 -4
  71. data/lib/shopify-cli/tasks/ensure_env.rb +74 -17
  72. data/lib/shopify-cli/tunnel.rb +22 -7
  73. data/lib/shopify-cli/version.rb +1 -1
  74. data/lib/shopify_cli.rb +35 -9
  75. data/shopify-cli.gemspec +4 -1
  76. data/vendor/deps/cli-kit/REVISION +1 -1
  77. data/vendor/deps/cli-kit/lib/cli/kit.rb +1 -1
  78. data/vendor/deps/cli-kit/lib/cli/kit/autocall.rb +2 -2
  79. data/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb +12 -6
  80. data/vendor/deps/cli-kit/lib/cli/kit/executor.rb +9 -11
  81. data/vendor/deps/cli-kit/lib/cli/kit/logger.rb +8 -2
  82. data/vendor/deps/cli-kit/lib/cli/kit/support/test_helper.rb +7 -7
  83. data/vendor/deps/cli-kit/lib/cli/kit/system.rb +48 -17
  84. data/vendor/deps/cli-ui/REVISION +1 -1
  85. data/vendor/deps/cli-ui/lib/cli/ui.rb +5 -4
  86. data/vendor/deps/cli-ui/lib/cli/ui/ansi.rb +9 -3
  87. data/vendor/deps/cli-ui/lib/cli/ui/color.rb +1 -0
  88. data/vendor/deps/cli-ui/lib/cli/ui/frame.rb +3 -2
  89. data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style.rb +1 -0
  90. data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/box.rb +13 -5
  91. data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/bracket.rb +29 -2
  92. data/vendor/deps/cli-ui/lib/cli/ui/glyph.rb +21 -10
  93. data/vendor/deps/cli-ui/lib/cli/ui/os.rb +63 -0
  94. data/vendor/deps/cli-ui/lib/cli/ui/prompt.rb +11 -2
  95. data/vendor/deps/cli-ui/lib/cli/ui/prompt/interactive_options.rb +1 -0
  96. data/vendor/deps/cli-ui/lib/cli/ui/spinner.rb +3 -3
  97. data/vendor/deps/cli-ui/lib/cli/ui/spinner/spin_group.rb +6 -8
  98. data/vendor/deps/cli-ui/lib/cli/ui/widgets.rb +2 -0
  99. data/vendor/gen/lib/gen.rb +39 -0
  100. data/vendor/gen/lib/gen/commands.rb +18 -0
  101. data/vendor/gen/lib/gen/commands/help.rb +20 -0
  102. data/vendor/gen/lib/gen/commands/new.rb +21 -0
  103. data/vendor/gen/lib/gen/entry_point.rb +10 -0
  104. data/vendor/gen/lib/gen/generator.rb +165 -0
  105. data/vendor/gen/template/.gitignore +2 -0
  106. data/vendor/gen/template/Gemfile +10 -0
  107. data/vendor/gen/template/README.md +1 -0
  108. data/vendor/gen/template/bin/testunit +23 -0
  109. data/vendor/gen/template/bin/update-deps +97 -0
  110. data/vendor/gen/template/dev-gems.yml +3 -0
  111. data/vendor/gen/template/dev-vendor.yml +4 -0
  112. data/vendor/gen/template/exe/__app__-gems +17 -0
  113. data/vendor/gen/template/exe/__app__-vendor +18 -0
  114. data/vendor/gen/template/lib/__app__.rb +33 -0
  115. data/vendor/gen/template/lib/__app__/commands.rb +18 -0
  116. data/vendor/gen/template/lib/__app__/commands/example.rb +19 -0
  117. data/vendor/gen/template/lib/__app__/commands/help.rb +21 -0
  118. data/vendor/gen/template/lib/__app__/entry_point.rb +10 -0
  119. data/vendor/gen/template/test/example_test.rb +17 -0
  120. data/vendor/gen/template/test/test_helper.rb +22 -0
  121. metadata +26 -4
  122. data/Vagrantfile +0 -17
  123. data/lib/project_types/script/forms/script_form.rb +0 -69
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d17f3e09b5ecfa047387eb3786b187bbb4e03068a28b71815c62a338e4d3b3a0
4
- data.tar.gz: e7ae1f805df2f928ae5b1c043d9b864fc8151750f1869d4d23d8a73757ecbba0
3
+ metadata.gz: aac6d7ad80aa747af6b8334b1cf6f82b3dfc0c6db77e8e22eb9638365b11317b
4
+ data.tar.gz: f5a744abb193c02bad16f0978d93bac2825ce287f95e3143848be47c28c8bbfc
5
5
  SHA512:
6
- metadata.gz: 609ad36002ecb5b13d41cb4c6a0cfb397e18087878372acc59e3f3520fad32eb59d661f122307ac95b0d456c216327da317f9c30a26bfdd360370cc5f0aede1d
7
- data.tar.gz: '094c183b361bd503a15d87e89b37c065361b78b3cfa69902a8176644c4f1d67c3890902889a069dc4049bd5a22ec4e6b9af258f19e12a0fc9a4e10aa72bab7e3'
6
+ metadata.gz: b934e0c4c5321cdb01d733886e2eae5fc23c94c1ea7115e9b18af302244512d93617440d1a4274ca764305c6797a10ef79285c97cf03636d473deec63a6a0d23
7
+ data.tar.gz: fec928d425a1be8c543d45d495156857fcf848c12170eaf825fdf549f70536198fdf076d71b35b448b97769869ac85e2eddb8d6dd1321a2f93949160cd2929fa
@@ -4,7 +4,7 @@ Shopify App CLI is an open source project. We want to make it as easy and transp
4
4
 
5
5
  ## Code of conduct
6
6
 
7
- We expect all participants to read our [code of conduct](https://github.com/Shopify/shopify-app-cli/.github/CODE_OF_CONDUCT.md) to understand which actions are and aren’t tolerated.
7
+ We expect all participants to read our [code of conduct](https://github.com/Shopify/shopify-app-cli/blob/master/.github/CODE_OF_CONDUCT.md) to understand which actions are and aren’t tolerated.
8
8
 
9
9
  ## Open development
10
10
 
@@ -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,6 +1,26 @@
1
+ Version 1.2.0
2
+ ------
3
+ * Improvements and new functionality to various internal components
4
+
5
+ Version 1.1.2
6
+ ------
7
+ * Fix various minor bugs (check dir before creating Rails project, catch stderr from failed git command)
8
+
9
+ Version 1.1.1
10
+ ------
11
+ * Fix a bug where usernames with spaces caused issues on Windows
12
+
13
+ Version 1.1.0
14
+ ------
15
+ * Add native Windows 10 support, including variety of stability fixes.
16
+
17
+ Version 1.0.5
18
+ ------
19
+ * Fix a bug in out opt-in metrics
20
+
1
21
  Version 1.0.4
2
22
  ------
3
- * Fix a bug when running the `connect` command with an account with multiple organizations
23
+ * Fix a bug when running the `connect` command with an account with multiple organizations
4
24
 
5
25
  Version 1.0.3
6
26
  ------
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)