orientepodspecpush 0.3.6 → 0.3.7
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/orientepodspecpush/version.rb +1 -1
- data/lib/orientepodspecpush.rb +82 -9
- 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: 4fa26e81068f8215cdaf67dae7fb391b57927638b19e7a9688aac99a020c3557
|
4
|
+
data.tar.gz: 2e677e8f5f521d305009605724c9c7a73d50d831b3ae7aa48c0bf2b9cf661f09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3b575e62e189f99f411d70f4b7b5f9121ff0f396d19e0184f23447086176825af0638d9fb117fb3af976ac39eacec301a861b55afabe1fa9d44446b55f35284
|
7
|
+
data.tar.gz: b587bfe4e54447ff0db10746eb0effbd20ecdfb720f3eb84bd26232e9141ec2ef15b2b61e9342e492c3d5ad91a934efb865946fd8d9acd65728fc48f92df003f
|
data/lib/orientepodspecpush.rb
CHANGED
@@ -2,6 +2,49 @@ require "orientepodspecpush/version"
|
|
2
2
|
require 'colorize'
|
3
3
|
require 'trollop'
|
4
4
|
|
5
|
+
# def test
|
6
|
+
# opts = Trollop::options do
|
7
|
+
# version "#{Orientepodspecpush::VERSION}"
|
8
|
+
# opt :specRepo, "Name of the repo to push to. See pod repo list for available repos", :type => :string
|
9
|
+
# opt :workspace, "Path to cocoapod workspace", :type => :string
|
10
|
+
# 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
|
11
|
+
# opt :private, "If set, assume the cocoapod is private and skip public checks"
|
12
|
+
# opt :tag, "tag of the repo push to", :type => :string
|
13
|
+
# opt :tagCommitMsg, "commit message of this tag", :type => :string
|
14
|
+
# opt :lint, "pod spec lint 情况下所需要的参数,需要用引号括起来,例如'--allow-warnings --sources=some source address'",:type => :string
|
15
|
+
# opt :package, "pod package 情况下所需要的参数,需要用引号括起来,例如'--force --no-mangle'",:type => :string
|
16
|
+
# opt :push, "pod repo push 情况下所需要的参数,需要用引号括起来,例如'--verbose --use-libraries'",:type => :string
|
17
|
+
# opt :noPackage, "If set, no need to package"
|
18
|
+
# end
|
19
|
+
|
20
|
+
# puts "lint:#{opts[:lint]}"
|
21
|
+
# puts "package:#{opts[:package]}"
|
22
|
+
# puts "push:#{opts[:push]}"
|
23
|
+
# puts "noPackage:#{opts[:noPackage]}"
|
24
|
+
# puts "tag:#{opts[:tag]}"
|
25
|
+
|
26
|
+
# if opts[:specRepo] == nil
|
27
|
+
# puts '空'
|
28
|
+
# else
|
29
|
+
# puts '非空'
|
30
|
+
# end
|
31
|
+
# # Need these two
|
32
|
+
# Trollop::die :specRepo, "Spec Repo must be provided" if opts[:specRepo] == nil
|
33
|
+
# Trollop::die :workspace, "Workspace path must be provided" if opts[:workspace] == nil
|
34
|
+
# Trollop::die :tag, "tag must be provided" if opts[:tag] == nil
|
35
|
+
# end
|
36
|
+
|
37
|
+
# test
|
38
|
+
|
39
|
+
# def test
|
40
|
+
# cmd = []
|
41
|
+
# cmd << "wo"
|
42
|
+
# cmd << ["ai","si"]
|
43
|
+
# cmd << "ni"
|
44
|
+
# puts cmd.join "--"
|
45
|
+
# end
|
46
|
+
|
47
|
+
# test
|
5
48
|
module Orientepodspecpush
|
6
49
|
class PodPush
|
7
50
|
|
@@ -26,7 +69,13 @@ module Orientepodspecpush
|
|
26
69
|
cmd << ['bundle exec'] if shouldUseBundleExec
|
27
70
|
podPackage = "pod package #{specfile}"
|
28
71
|
cmd << [podPackage]
|
29
|
-
|
72
|
+
packageCmd = "--force --spec-sources='ssh://git-codecommit.ap-southeast-1.amazonaws.com/v1/repos/ios-OrienteSpecs, https://github.com/CocoaPods/Specs.git'"
|
73
|
+
if opts[:package].included? "--spec-sources"
|
74
|
+
cmd << opts[:package] unless opts[:package] == nil
|
75
|
+
else
|
76
|
+
cmd << packageCmd
|
77
|
+
end
|
78
|
+
|
30
79
|
|
31
80
|
system cmd.join(' ')
|
32
81
|
|
@@ -69,11 +118,18 @@ module Orientepodspecpush
|
|
69
118
|
|
70
119
|
# Build lintCmd
|
71
120
|
lintCmd << specfile
|
121
|
+
|
122
|
+
lintCommand = "--allow-warnings --sources='ssh://git-codecommit.ap-southeast-1.amazonaws.com/v1/repos/ios-OrienteSpecs,https://github.com/CocoaPods/Specs.git'"
|
123
|
+
if opts[:lint].included? "--sources"
|
124
|
+
lintCmd << ["#{opts[:lint]}"]
|
125
|
+
else
|
126
|
+
lintCmd << [lintCommand]
|
127
|
+
end
|
72
128
|
# lintCmd << sourcesArg
|
73
|
-
lintCmd << opts[:sources] unless opts[:sources] == nil
|
74
|
-
|
129
|
+
# lintCmd << opts[:sources] unless opts[:sources] == nil
|
130
|
+
|
75
131
|
lintCmd << ["--private"] unless opts[:private] == false
|
76
|
-
|
132
|
+
|
77
133
|
# finalize
|
78
134
|
lintCmd.join(' ')
|
79
135
|
end
|
@@ -81,9 +137,21 @@ module Orientepodspecpush
|
|
81
137
|
def makePushCmd(opts)
|
82
138
|
cmd = []
|
83
139
|
cmd << ['bundle exec'] if shouldUseBundleExec
|
84
|
-
|
85
|
-
|
86
|
-
|
140
|
+
if opts[:specRepo] == nil
|
141
|
+
podRepoPush = "pod repo push OrienteSpecs #{specfile}"
|
142
|
+
else
|
143
|
+
podRepoPush = "pod repo push #{opts[:specRepo]} #{specfile}"
|
144
|
+
end
|
145
|
+
|
146
|
+
# cmd << [podRepoPush]
|
147
|
+
cmd << podRepoPush
|
148
|
+
pushCommand = "--allow-warnings --sources='ssh://git-codecommit.ap-southeast-1.amazonaws.com/v1/repos/ios-OrienteSpecs,https://github.com/CocoaPods/Specs.git'"
|
149
|
+
if opts[:push].included? "--sources"
|
150
|
+
cmd << opts[:push]
|
151
|
+
else
|
152
|
+
cmd << pushCommand
|
153
|
+
end
|
154
|
+
# cmd << opts[:push] unless opts[:push] == nil
|
87
155
|
|
88
156
|
cmd.join(' ')
|
89
157
|
end
|
@@ -106,7 +174,12 @@ module Orientepodspecpush
|
|
106
174
|
system "git tag -a #{@podVersion} -m '#{@podVersionMessage}'"
|
107
175
|
end
|
108
176
|
# system "git tag -a #{@podVersion} -m '#{@podVersionMessage}'"
|
109
|
-
system "git push --tags"
|
177
|
+
flag = system "git push --tags"
|
178
|
+
if flag == false
|
179
|
+
system "git tag -d #{@podVersion}"
|
180
|
+
exit
|
181
|
+
|
182
|
+
end
|
110
183
|
|
111
184
|
contents = File.read(specfile)
|
112
185
|
oldVersion = Regexp.new('[0-9.]{2,8}').match(Regexp.new('(s.version)\s*=.*\n').match(contents).to_s).to_s
|
@@ -197,7 +270,7 @@ module Orientepodspecpush
|
|
197
270
|
puts "noPackage:#{opts[:noPackage]}"
|
198
271
|
puts "tag:#{opts[:tag]}"
|
199
272
|
# Need these two
|
200
|
-
Trollop::die :specRepo, "Spec Repo must be provided" if opts[:specRepo] == nil
|
273
|
+
# Trollop::die :specRepo, "Spec Repo must be provided" if opts[:specRepo] == nil
|
201
274
|
Trollop::die :workspace, "Workspace path must be provided" if opts[:workspace] == nil
|
202
275
|
Trollop::die :tag, "tag must be provided" if opts[:tag] == nil
|
203
276
|
|
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.3.
|
4
|
+
version: 0.3.7
|
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-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trollop
|