shopify-cli 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/{LICENSE.md → LICENSE} +0 -0
- data/RELEASING.md +51 -0
- data/Rakefile +1 -6
- data/lib/shopify-cli/packager.rb +17 -25
- data/lib/shopify-cli/version.rb +1 -1
- data/shopify-cli.gemspec +3 -5
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c41d92242b50f6d361cd7ad137799bffe507581437f25a1eb1bd183cc206c63
|
4
|
+
data.tar.gz: '06887cc6c8442a754bf9a9d60e10968c5c59325b98a50d452e6f849a80db7226'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23260cf14a8e617539fedb1bddf1beb5f91604fc5db87d147335649dd01f7fb9859c87da6a01bba5c19743dabc8aa0c1c55bf269cdaec57943f076a88fffcff9
|
7
|
+
data.tar.gz: eddd93f62bb2bd7f8364c4c423847568838d08fdbf77f777f03f2adb9fbfa67f7a3af83bedc48025f217e1787288f5b6e10424e5dbdad1156a8faaf80ddb041c
|
data/CHANGELOG.md
ADDED
data/{LICENSE.md → LICENSE}
RENAMED
File without changes
|
data/RELEASING.md
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
## Releasing Shopify CLI
|
2
|
+
|
3
|
+
1. Check the Semantic Versioning page for info on how to version the new release: http://semver.org
|
4
|
+
|
5
|
+
2. Create a branch named `release_X_Y_Z` (replacing `X_Y_Z` with the intended release version)
|
6
|
+
```
|
7
|
+
$ git checkout -b release_X_Y_Z
|
8
|
+
```
|
9
|
+
|
10
|
+
3. Update the version of Shopify CLI in `lib/shopify-cli/version.rb`
|
11
|
+
|
12
|
+
4. Add an entry for the new release to `CHANGELOG.md`
|
13
|
+
|
14
|
+
5. Commit the changes with a commit message like "Packaging for release X.Y.Z"
|
15
|
+
```
|
16
|
+
$ git commit -am "Packaging for release X.Y.Z"
|
17
|
+
```
|
18
|
+
|
19
|
+
6. Push out the changes
|
20
|
+
```
|
21
|
+
$ git push -u origin release_X_Y_Z
|
22
|
+
```
|
23
|
+
|
24
|
+
7. Open a PR for the branch, get necessary approvals from code owners and merge into main branch
|
25
|
+
|
26
|
+
8. Deploy using Shipit
|
27
|
+
|
28
|
+
9. On local machine and _AFTER_ gem has been published to https://rubygems.org, run
|
29
|
+
```
|
30
|
+
$ rake package
|
31
|
+
```
|
32
|
+
This will generate the `.deb`, `.rpm` and brew formula files, which will be located in `packaging/builds/X.Y.Z/`.
|
33
|
+
|
34
|
+
10. Clone the `Shopify/homebrew-shopify` repository (if not already cloned), and then
|
35
|
+
* create a branch named `release_X_Y_Z_of_shopify-cli`
|
36
|
+
* update the brew formula in `shopify-cli.rb` with the generated formula in `packaging/builds/X.Y.Z/` in the `Shopify/shopify-app-cli` repo (from step 9)
|
37
|
+
* commit the change and create a PR
|
38
|
+
* when PR is approved, merge into main branch of `Shopify/homebrew-shopify` repository
|
39
|
+
|
40
|
+
11. Go to [releases](https://github.com/Shopify/shopify-app-cli/releases) page of `Shopify/shopify-app-cli` repo and create a new release:
|
41
|
+
* use the tag created in step 8 by Shipit (should be "vX.Y.Z")
|
42
|
+
* release title = "Version X.Y.Z"
|
43
|
+
* description should be
|
44
|
+
```
|
45
|
+
Release of version X.Y.Z of Shopify App CLI
|
46
|
+
|
47
|
+
Please refer to [CHANGELOG](https://github.com/Shopify/shopify-app-cli/blob/master/CHANGELOG.md) for details.
|
48
|
+
```
|
49
|
+
* upload the `.deb` and `.rpm` files from `packaging/builds/X.Y.Z/` (generated in step 9)
|
50
|
+
* if it's a pre-release version, select the "This is a pre-release" checkbox
|
51
|
+
* and click "Publish release".
|
data/Rakefile
CHANGED
@@ -76,11 +76,6 @@ namespace :package do
|
|
76
76
|
|
77
77
|
task all: [:debian, :rpm, :homebrew]
|
78
78
|
|
79
|
-
desc("Builds a gem of the CLI")
|
80
|
-
task :gem do
|
81
|
-
ShopifyCli::Packager.new.build_gem
|
82
|
-
end
|
83
|
-
|
84
79
|
desc("Builds a Debian package of the CLI")
|
85
80
|
task :debian do
|
86
81
|
ShopifyCli::Packager.new.build_debian
|
@@ -92,7 +87,7 @@ namespace :package do
|
|
92
87
|
end
|
93
88
|
|
94
89
|
desc("Builds a Homebrew package of the CLI")
|
95
|
-
task :homebrew
|
90
|
+
task :homebrew do
|
96
91
|
ShopifyCli::Packager.new.build_homebrew
|
97
92
|
end
|
98
93
|
end
|
data/lib/shopify-cli/packager.rb
CHANGED
@@ -7,22 +7,8 @@ module ShopifyCli
|
|
7
7
|
FileUtils.mkdir_p(BUILDS_DIR)
|
8
8
|
end
|
9
9
|
|
10
|
-
def build_gem
|
11
|
-
build_path = gem_path
|
12
|
-
puts "\nBuilding gem"
|
13
|
-
|
14
|
-
puts "Outputting gem to:\n #{build_path}\n\n"
|
15
|
-
raise "Failed to build gem" unless system(
|
16
|
-
'gem',
|
17
|
-
'build',
|
18
|
-
'-o',
|
19
|
-
build_path,
|
20
|
-
File.join(ShopifyCli::ROOT, 'shopify-cli.gemspec')
|
21
|
-
)
|
22
|
-
end
|
23
|
-
|
24
10
|
def build_debian
|
25
|
-
ensure_program_installed('dpkg-deb')
|
11
|
+
ensure_program_installed('dpkg-deb', 'brew install dpkg')
|
26
12
|
|
27
13
|
root_dir = File.join(PACKAGING_DIR, 'debian')
|
28
14
|
debian_dir = File.join(root_dir, 'shopify-cli', 'DEBIAN')
|
@@ -54,7 +40,7 @@ module ShopifyCli
|
|
54
40
|
end
|
55
41
|
|
56
42
|
def build_rpm
|
57
|
-
ensure_program_installed('rpmbuild')
|
43
|
+
ensure_program_installed('rpmbuild', 'brew install rpm')
|
58
44
|
|
59
45
|
root_dir = File.join(PACKAGING_DIR, 'rpm')
|
60
46
|
rpm_build_dir = File.join(root_dir, 'build')
|
@@ -92,10 +78,14 @@ module ShopifyCli
|
|
92
78
|
spec_contents = File.read(File.join(root_dir, 'shopify-cli.base.rb'))
|
93
79
|
spec_contents = spec_contents.gsub('SHOPIFY_CLI_VERSION', ShopifyCli::VERSION)
|
94
80
|
|
95
|
-
|
96
|
-
|
81
|
+
puts "Grabbing sha256 checksum from Rubygems.org"
|
82
|
+
require 'digest/sha2'
|
83
|
+
require 'open-uri'
|
84
|
+
gem_checksum = open("https://rubygems.org/downloads/shopify-cli-#{ShopifyCli::VERSION}.gem") do |io|
|
85
|
+
Digest::SHA256.new.hexdigest(io.read)
|
86
|
+
end
|
97
87
|
|
98
|
-
puts "Got sha256
|
88
|
+
puts "Got sha256 checksum for gem: #{gem_checksum}"
|
99
89
|
spec_contents = spec_contents.gsub('SHOPIFY_CLI_GEM_CHECKSUM', gem_checksum)
|
100
90
|
|
101
91
|
puts "Writing generated formula\n To: #{build_path}\n\n"
|
@@ -104,13 +94,15 @@ module ShopifyCli
|
|
104
94
|
|
105
95
|
private
|
106
96
|
|
107
|
-
def ensure_program_installed(program)
|
108
|
-
|
109
|
-
|
110
|
-
|
97
|
+
def ensure_program_installed(program, installation_cmd)
|
98
|
+
unless system(program, '--version', out: File::NULL, err: File::NULL)
|
99
|
+
raise <<~MESSAGE
|
100
|
+
|
101
|
+
Could not find program #{program} which is required to build the package.
|
102
|
+
You can install it by running `#{installation_cmd}`.
|
111
103
|
|
112
|
-
|
113
|
-
|
104
|
+
MESSAGE
|
105
|
+
end
|
114
106
|
end
|
115
107
|
end
|
116
108
|
end
|
data/lib/shopify-cli/version.rb
CHANGED
data/shopify-cli.gemspec
CHANGED
@@ -4,9 +4,8 @@ Gem::Specification.new do |spec|
|
|
4
4
|
spec.name = "shopify-cli"
|
5
5
|
spec.version = ShopifyCli::VERSION
|
6
6
|
spec.authors = ["Shopify"]
|
7
|
-
|
8
|
-
spec.
|
9
|
-
spec.license = 'Nonstandard'
|
7
|
+
spec.email = ["dev-tools-education@shopify.com"]
|
8
|
+
spec.license = 'MIT'
|
10
9
|
|
11
10
|
spec.summary = "Shopify CLI helps you build Shopify apps faster."
|
12
11
|
spec.description = <<~HERE
|
@@ -16,7 +15,7 @@ Gem::Specification.new do |spec|
|
|
16
15
|
and webhooks.
|
17
16
|
HERE
|
18
17
|
spec.homepage = "https://shopify.github.io/shopify-app-cli/"
|
19
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.
|
18
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.5")
|
20
19
|
|
21
20
|
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
22
21
|
|
@@ -30,7 +29,6 @@ Gem::Specification.new do |spec|
|
|
30
29
|
%x(git ls-files -z).split("\x0").reject { |f| f.match(%r{^(test|spec|features|packaging)/}) }
|
31
30
|
end
|
32
31
|
spec.bindir = "bin"
|
33
|
-
# spec.executables = spec.files.grep(%r{^bin/}) { |f| f.sub('bin/', '') }
|
34
32
|
spec.require_paths = ["lib", "vendor"]
|
35
33
|
spec.extensions = ["ext/shopify-cli/extconf.rb"]
|
36
34
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopify-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -64,7 +64,7 @@ description: |
|
|
64
64
|
development process and lets you quickly add popular features, such as billing
|
65
65
|
and webhooks.
|
66
66
|
email:
|
67
|
-
-
|
67
|
+
- dev-tools-education@shopify.com
|
68
68
|
executables: []
|
69
69
|
extensions:
|
70
70
|
- ext/shopify-cli/extconf.rb
|
@@ -83,10 +83,12 @@ files:
|
|
83
83
|
- ".tmp/.gitkeep"
|
84
84
|
- ".tmp/sv/.gitkeep"
|
85
85
|
- ".travis.yml"
|
86
|
+
- CHANGELOG.md
|
86
87
|
- Gemfile
|
87
88
|
- Gemfile.lock
|
88
|
-
- LICENSE
|
89
|
+
- LICENSE
|
89
90
|
- README.md
|
91
|
+
- RELEASING.md
|
90
92
|
- Rakefile
|
91
93
|
- SECURITY.md
|
92
94
|
- Vagrantfile
|
@@ -345,7 +347,7 @@ files:
|
|
345
347
|
- vendor/lib/semantic/version.rb
|
346
348
|
homepage: https://shopify.github.io/shopify-app-cli/
|
347
349
|
licenses:
|
348
|
-
-
|
350
|
+
- MIT
|
349
351
|
metadata:
|
350
352
|
allowed_push_host: https://rubygems.org
|
351
353
|
homepage_uri: https://shopify.github.io/shopify-app-cli/
|
@@ -360,7 +362,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
360
362
|
requirements:
|
361
363
|
- - ">="
|
362
364
|
- !ruby/object:Gem::Version
|
363
|
-
version: 2.
|
365
|
+
version: '2.5'
|
364
366
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
365
367
|
requirements:
|
366
368
|
- - ">="
|