pod_updater 0.6.0 → 0.6.1
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/Gemfile.lock +4 -2
- data/lib/pod_updater.rb +1 -7
- data/lib/pod_updater/git_tag_flow.rb +2 -2
- data/lib/pod_updater/pod_push.rb +8 -1
- data/lib/pod_updater/ui.rb +10 -0
- data/lib/pod_updater/version.rb +1 -1
- data/pod_updater.gemspec +1 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79164edbbfe35b0a0ef4e235b1295e834083969071f5721f69eae9b6df558261
|
4
|
+
data.tar.gz: 9be3f3171c685b63ddb17eb817bd8bdfcd0a4f52d65c09990cc3530fb4f40aff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd1ab5837a4e4cbfaf6fc178e3d30e9e80fcdd2f7225c005fc1e40fd59469fd9bff3eec856d5e768b32d910dec3ff1a2e85039318a05a025cedcde271b5898c1
|
7
|
+
data.tar.gz: c82f7f66eb9ffaaa3118ac1837280922cb78af56b4589ec836a472561e93c3e51d3674c5d0a4175d9e07138278048629383636896d6e50d900189ec060132837
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pod_updater (0.
|
4
|
+
pod_updater (0.6.0)
|
5
5
|
colorize
|
6
|
+
terminal-notifier
|
6
7
|
|
7
8
|
GEM
|
8
9
|
remote: https://rubygems.org/
|
9
10
|
specs:
|
10
11
|
colorize (0.8.1)
|
11
12
|
rake (10.4.2)
|
13
|
+
terminal-notifier (2.0.0)
|
12
14
|
|
13
15
|
PLATFORMS
|
14
16
|
ruby
|
@@ -19,4 +21,4 @@ DEPENDENCIES
|
|
19
21
|
rake (~> 10.0)
|
20
22
|
|
21
23
|
BUNDLED WITH
|
22
|
-
1.16.
|
24
|
+
1.16.6
|
data/lib/pod_updater.rb
CHANGED
@@ -2,19 +2,13 @@
|
|
2
2
|
# $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
3
|
|
4
4
|
require "pod_updater/version"
|
5
|
-
|
6
|
-
load "/Users/kaifa/Desktop/Working/GitLab/pod_updater/lib/pod_updater/pod_push.rb"
|
5
|
+
require "pod_updater/pod_push"
|
7
6
|
|
8
7
|
module PodUpdater
|
9
8
|
|
10
9
|
def self.run(version, cp_path)
|
11
10
|
path = File.expand_path(Dir.pwd)
|
12
|
-
path = "/Users/kaifa/Desktop/Working/GitLab/WZ_HelloKit/"
|
13
11
|
pushPodToSevice(path, version, cp_path)
|
14
12
|
end
|
15
13
|
|
16
|
-
puts "开始"
|
17
|
-
PodUpdater.run('5.5.5', nil)
|
18
|
-
puts "结束"
|
19
|
-
|
20
14
|
end
|
@@ -21,8 +21,8 @@ module PodUpdater
|
|
21
21
|
end
|
22
22
|
|
23
23
|
tag_cmd = []
|
24
|
-
tag_cmd << %(git tag -
|
25
|
-
tag_cmd << 'git push --tags'
|
24
|
+
tag_cmd << %(git tag -f #{tag_version} -m "#{msg}")
|
25
|
+
tag_cmd << 'git push --tags -f'
|
26
26
|
|
27
27
|
UI.log_cmd(tag_cmd)
|
28
28
|
IO.popen(tag_cmd.join(" && ")) do |io|
|
data/lib/pod_updater/pod_push.rb
CHANGED
@@ -3,7 +3,6 @@ require 'pod_updater/modify_podspec'
|
|
3
3
|
require 'pod_updater/ui'
|
4
4
|
require 'pod_updater/cp_podspec'
|
5
5
|
require 'pod_updater/pod_updater_file'
|
6
|
-
require 'Cocoapods'
|
7
6
|
|
8
7
|
module PodUpdater
|
9
8
|
|
@@ -51,13 +50,21 @@ module PodUpdater
|
|
51
50
|
|
52
51
|
cmd = []
|
53
52
|
cmd << %(pod trunk push #{podFilePath} --allow-warnings)
|
53
|
+
push_cmd_output = ""
|
54
54
|
UI.log_cmd(cmd)
|
55
55
|
IO.popen(cmd.join('')) do |io|
|
56
56
|
io.each do |line|
|
57
57
|
UI.msg(line)
|
58
|
+
push_cmd_output += line.to_s
|
58
59
|
end
|
59
60
|
end
|
60
61
|
|
62
|
+
if output =~ %r(ERROR|error)
|
63
|
+
UI.err("pod lib lint 发生错误")
|
64
|
+
else
|
65
|
+
UI.notification(title: "上传完成✅")
|
66
|
+
end
|
67
|
+
|
61
68
|
end
|
62
69
|
|
63
70
|
module_function :pushPodToSevice
|
data/lib/pod_updater/ui.rb
CHANGED
@@ -5,6 +5,7 @@ module PodUpdater
|
|
5
5
|
class UI
|
6
6
|
def self.err(msg)
|
7
7
|
puts msg.colorize(:red)
|
8
|
+
self.notification(title: 'pod_updater get error', message: msg)
|
8
9
|
end
|
9
10
|
|
10
11
|
def self.success(msg)
|
@@ -25,6 +26,15 @@ module PodUpdater
|
|
25
26
|
end
|
26
27
|
puts msg.to_s.colorize(:blue)
|
27
28
|
end
|
29
|
+
|
30
|
+
def self.notification(title: "", message: "", **args)
|
31
|
+
`terminal-notifier -title '#{title}r' -message '#{message}' -activate 'com.apple.Terminal'`
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.notification_openurl((title: "", message: "", url: "", **args)
|
35
|
+
`terminal-notifier -title '#{title}r' -message '#{message}' -open '#{url}'`
|
36
|
+
end
|
37
|
+
|
28
38
|
end
|
29
39
|
|
30
40
|
|
data/lib/pod_updater/version.rb
CHANGED
data/pod_updater.gemspec
CHANGED
@@ -32,6 +32,7 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.require_paths = ["lib"]
|
33
33
|
|
34
34
|
spec.add_runtime_dependency "colorize"
|
35
|
+
spec.add_runtime_dependency "terminal-notifier"
|
35
36
|
|
36
37
|
spec.add_development_dependency "bundler", "~> 1.16"
|
37
38
|
spec.add_development_dependency "rake", "~> 10.0"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pod_updater
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- hwzss
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: terminal-notifier
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|