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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e901da40a2bfad15692e11ae573ffa8471f45683061a25e849be971d06ec6b18
4
- data.tar.gz: fe55f589b72c9ab4500305107605475e5539ad427e31010fc89676e6d02f03dd
3
+ metadata.gz: 0be18ce9e6bc59adb214d016f6917f259dd283bccb7a9fac5a0b7d679a67fb94
4
+ data.tar.gz: f62e6968808459c36573878f403089a00c18e1135053a0b0f68b34eac594a18a
5
5
  SHA512:
6
- metadata.gz: efa68b8a123d95f67ca1f5201feeb5aa591255cf17570e17bc0e07791007c82431260d979ee12f1e8fa88cfc4ef376879af56540e162065582ab3293ece39bf8
7
- data.tar.gz: bce2011a5df54205f15fdac587c0a660dfb52c513a571738f0f9b9d91fba58716b370593539ca91721bf4b50ea0e9e3d8f9849da0a5bd794460d8161fb7d8fb2
6
+ metadata.gz: 6991d9c97e3b73ca84d2837af604469fc271a7debd6ef3c850994fe7a2f872edda399125a06094581142ba5fc6f946f6d232b3413b2c21f969b2f37f9998b107
7
+ data.tar.gz: 4e29b83ffe01c3c1d86eea2f8c77abb9db8eaec009dada3d07c138b936302a0350d9453dd7aced2ab352bae8480b01715f16db1247179276647b8bfa7b08f8f8
@@ -1,3 +1,3 @@
1
1
  module Orientepodspecpush
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -20,12 +20,20 @@ module Orientepodspecpush
20
20
  exit unless podspecFile != nil
21
21
  end
22
22
 
23
- def packageCode
23
+ def package
24
24
  cmd = []
25
25
  cmd << ['bundle exec'] if shouldUseBundleExec
26
- cmd << ["pod package #{specfile} --force"]
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
- lintCmd << ["pod spec lint"]
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
- cmd << ["pod repo push #{opts[:specRepo]} #{specfile} --allow-warnings"]
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
- cmd = []
126
- cmd << ['bundle exec'] if shouldUseBundleExec
127
- cmd << ["pod package #{specfile} --force --spec-sources=ssh://git-codecommit.ap-southeast-1.amazonaws.com/v1/repos/ios-OrienteSpecs, https://github.com/CocoaPods/Specs.git"]
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.0
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-12 00:00:00.000000000 Z
11
+ date: 2018-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trollop