orientepodspecpush 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/orientepodspecpush/version.rb +1 -1
- data/lib/orientepodspecpush.rb +32 -13
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0be18ce9e6bc59adb214d016f6917f259dd283bccb7a9fac5a0b7d679a67fb94
|
4
|
+
data.tar.gz: f62e6968808459c36573878f403089a00c18e1135053a0b0f68b34eac594a18a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6991d9c97e3b73ca84d2837af604469fc271a7debd6ef3c850994fe7a2f872edda399125a06094581142ba5fc6f946f6d232b3413b2c21f969b2f37f9998b107
|
7
|
+
data.tar.gz: 4e29b83ffe01c3c1d86eea2f8c77abb9db8eaec009dada3d07c138b936302a0350d9453dd7aced2ab352bae8480b01715f16db1247179276647b8bfa7b08f8f8
|
data/lib/orientepodspecpush.rb
CHANGED
@@ -20,12 +20,20 @@ module Orientepodspecpush
|
|
20
20
|
exit unless podspecFile != nil
|
21
21
|
end
|
22
22
|
|
23
|
-
def
|
23
|
+
def package
|
24
24
|
cmd = []
|
25
25
|
cmd << ['bundle exec'] if shouldUseBundleExec
|
26
|
-
|
27
|
-
|
26
|
+
podPackage = "pod package #{specfile}"
|
27
|
+
if opts[:package] != nil
|
28
|
+
podPackage + opts[:package]
|
29
|
+
end
|
30
|
+
cmd << [podPackage]
|
31
|
+
|
28
32
|
system cmd.join(' ')
|
33
|
+
# system "git add ."
|
34
|
+
# system "git commit -m 'upload framework'"
|
35
|
+
# system "git push origin master"
|
36
|
+
|
29
37
|
end
|
30
38
|
|
31
39
|
def ensureGitClean
|
@@ -43,7 +51,14 @@ module Orientepodspecpush
|
|
43
51
|
def makeLintCmd(opts)
|
44
52
|
lintCmd = []
|
45
53
|
lintCmd << ['bundle exec'] if shouldUseBundleExec
|
46
|
-
|
54
|
+
podSpecLint = "pod spec lint"
|
55
|
+
if opts[:lint] != nil
|
56
|
+
podSpecLint + opts[:lint]
|
57
|
+
end
|
58
|
+
|
59
|
+
lintCmd << [podSpecLint]
|
60
|
+
|
61
|
+
|
47
62
|
|
48
63
|
# Build sources
|
49
64
|
sources = ["https://github.com/CocoaPods/Specs.git"]
|
@@ -62,7 +77,11 @@ module Orientepodspecpush
|
|
62
77
|
def makePushCmd(opts)
|
63
78
|
cmd = []
|
64
79
|
cmd << ['bundle exec'] if shouldUseBundleExec
|
65
|
-
|
80
|
+
podRepoPush = "pod repo push #{opts[:specRepo]} #{specfile}"
|
81
|
+
if opts[:push] != nil
|
82
|
+
podRepoPush + opts[:push]
|
83
|
+
end
|
84
|
+
cmd << [podRepoPush]
|
66
85
|
|
67
86
|
cmd.join(' ')
|
68
87
|
end
|
@@ -122,14 +141,9 @@ module Orientepodspecpush
|
|
122
141
|
puts "Even with warnings, something is wrong. Look for any errors".red
|
123
142
|
rollbackTag
|
124
143
|
else
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
system cmd.join(' ')
|
130
|
-
system "git add ."
|
131
|
-
system "git commit -m 'upload framework'"
|
132
|
-
system "git push origin master"
|
144
|
+
if opts[:noPackage] == false
|
145
|
+
package
|
146
|
+
end
|
133
147
|
end
|
134
148
|
end
|
135
149
|
|
@@ -144,6 +158,7 @@ module Orientepodspecpush
|
|
144
158
|
end
|
145
159
|
|
146
160
|
def commitThisRepo
|
161
|
+
system "git add ."
|
147
162
|
puts "Congrats! The pod has been linted and successfully push to the spec repo! All that is left is to commit the podspec here!".green
|
148
163
|
|
149
164
|
puts "Could not commit files, consider finishing by hand by performing a git commit and push. Your spec repo should be up to date".red unless system('git commit -am "[Versioning] Updating podspec"') == true
|
@@ -156,6 +171,10 @@ module Orientepodspecpush
|
|
156
171
|
opt :workspace, "Path to cocoapod workspace", :type => :string
|
157
172
|
opt :sources, "Comma delimited list of private repo sources to consider when linting private repo. Master is included by default so private repos can source master", :type => :string
|
158
173
|
opt :private, "If set, assume the cocoapod is private and skip public checks"
|
174
|
+
opt :lint, "pod spec lint 情况下所需要的参数,需要用引号括起来,例如'--allow-warnings --sources=some source address'"
|
175
|
+
opt :package, "pod package 情况下所需要的参数,需要用引号括起来,例如'--force --no-mangle'"
|
176
|
+
opt :push, "pod repo push 情况下所需要的参数,需要用引号括起来,例如'--verbose --use-libraries'"
|
177
|
+
opt :noPackage, "If set, no need to package"
|
159
178
|
end
|
160
179
|
# Need these two
|
161
180
|
Trollop::die :specRepo, "Spec Repo must be provided" if opts[:specRepo] == nil
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orientepodspecpush
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John wang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trollop
|