zendesk_apps_tools 1.23.1 → 1.24.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.
- checksums.yaml +4 -4
- data/lib/zendesk_apps_tools/bump.rb +29 -0
- data/lib/zendesk_apps_tools/manifest_handler.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c415a57b078b48bafed32526b7a1050496bd5fe6
|
|
4
|
+
data.tar.gz: 7940d222e7e47aaf3a96fb208a760501f710187b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d64876bb06c0f1861a9d61d847cb8fb88472ebcb6c3b20f11b48e156c0bba1e96bf597ca844c8bca165eb17ca91a0b0c12399925652a32fc2dc830e91f806d0f
|
|
7
|
+
data.tar.gz: 6f2cf9a2901c55d4fb1cf4c6479f3303abcb316e27927f96c4df6f8e6b6fc12098254a37da6bd8fe06d9387c95f77c4fb5c8ffe05813406584aa9606666aabea
|
|
@@ -8,7 +8,14 @@ module ZendeskAppsTools
|
|
|
8
8
|
include Thor::Actions
|
|
9
9
|
prepend ManifestHandler
|
|
10
10
|
|
|
11
|
+
SHARED_OPTIONS = {
|
|
12
|
+
['commit', '-c'] => false,
|
|
13
|
+
['message', '-m'] => nil,
|
|
14
|
+
['tag', '-t'] => false
|
|
15
|
+
}
|
|
16
|
+
|
|
11
17
|
desc 'major', 'Bump major version'
|
|
18
|
+
method_options SHARED_OPTIONS
|
|
12
19
|
def major
|
|
13
20
|
semver[:major] += 1
|
|
14
21
|
semver[:minor] = 0
|
|
@@ -16,16 +23,38 @@ module ZendeskAppsTools
|
|
|
16
23
|
end
|
|
17
24
|
|
|
18
25
|
desc 'minor', 'Bump minor version'
|
|
26
|
+
method_options SHARED_OPTIONS
|
|
19
27
|
def minor
|
|
20
28
|
semver[:minor] += 1
|
|
21
29
|
semver[:patch] = 0
|
|
22
30
|
end
|
|
23
31
|
|
|
24
32
|
desc 'patch', 'Bump patch version'
|
|
33
|
+
method_options SHARED_OPTIONS
|
|
25
34
|
def patch
|
|
26
35
|
semver[:patch] += 1
|
|
27
36
|
end
|
|
28
37
|
|
|
29
38
|
default_task :patch
|
|
39
|
+
|
|
40
|
+
private
|
|
41
|
+
|
|
42
|
+
def post_actions
|
|
43
|
+
return tag if options[:tag]
|
|
44
|
+
commit if options[:commit]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def commit
|
|
48
|
+
`git commit -am #{commit_message}`
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def commit_message
|
|
52
|
+
options[:message] || version(v: true)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def tag
|
|
56
|
+
commit
|
|
57
|
+
`git tag #{version(v: true)}`
|
|
58
|
+
end
|
|
30
59
|
end
|
|
31
60
|
end
|
|
@@ -14,6 +14,7 @@ module ZendeskAppsTools
|
|
|
14
14
|
super()
|
|
15
15
|
update_version
|
|
16
16
|
write_manifest
|
|
17
|
+
post_actions
|
|
17
18
|
end
|
|
18
19
|
end
|
|
19
20
|
|
|
@@ -57,9 +58,9 @@ module ZendeskAppsTools
|
|
|
57
58
|
v.match(/\A(?<v>v)?(?<major>\d+)(?:\.(?<minor>\d+)(?:\.(?<patch>\d+))?)?\Z/)
|
|
58
59
|
end
|
|
59
60
|
|
|
60
|
-
def version
|
|
61
|
+
def version(v: false)
|
|
61
62
|
[
|
|
62
|
-
semver[:v],
|
|
63
|
+
v ? 'v' : semver[:v],
|
|
63
64
|
[
|
|
64
65
|
semver[:major],
|
|
65
66
|
semver[:minor],
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zendesk_apps_tools
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.24.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James A. Rosen
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2015-06-
|
|
14
|
+
date: 2015-06-04 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: thor
|