cocoapods-pahealth-bin 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cocoapods-pahealth-bin.rb +1 -0
- data/lib/cocoapods-pahealth-bin/command/bin/repo/push.rb +12 -20
- data/lib/cocoapods-pahealth-bin/command/bin/repo/update.rb +8 -3
- data/lib/cocoapods-pahealth-bin/command/bin/spec/lint.rb +11 -17
- data/lib/cocoapods-pahealth-bin/command/bin/update.rb +1 -1
- data/lib/cocoapods-pahealth-bin/config/config.rb +5 -47
- data/lib/cocoapods-pahealth-bin/config/config_asker.rb +0 -1
- data/lib/cocoapods-pahealth-bin/gem_version.rb +1 -1
- data/lib/cocoapods-pahealth-bin/helpers/sources_helper.rb +3 -3
- data/lib/cocoapods-pahealth-bin/native/podfile.rb +0 -8
- data/lib/cocoapods-pahealth-bin/native/podfile_env.rb +0 -1
- data/lib/cocoapods-pahealth-bin/source_provider_hook.rb +0 -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: c425660864d3b8b05518e496fb36bff6a558f0146a2072442669aadf4c2d946b
|
4
|
+
data.tar.gz: d3001b8edad764f0d0112a4dafb869832958ba7fe7cf6a6e1dcf30e342fc96e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f567e671d1d5794c8393cc794dabaa25df139d5276955ef3e13f81c98faf34f95282d0f33c8188d720d6d826c23c5099338889918e4e8cef987320b21f479be6
|
7
|
+
data.tar.gz: 4e25e4dfb7543767ab1927a15b6a9117cd0f7a6edce7fce7a0f6c3ed0124875a8d78cb9cf0dffc4dcc090d0fc13c27dcaac2b080ea9054df09c25796d09ff248
|
@@ -17,39 +17,31 @@ module Pod
|
|
17
17
|
|
18
18
|
def self.options
|
19
19
|
[
|
20
|
-
|
20
|
+
|
21
21
|
].concat(Pod::Command::Repo::Push.options).concat(super).uniq
|
22
22
|
end
|
23
23
|
|
24
24
|
def initialize(argv)
|
25
25
|
@podspec = argv.shift_argument
|
26
|
-
@
|
27
|
-
@
|
26
|
+
@sources = argv.option('sources')
|
27
|
+
@code_dependencies = argv.flag?('code-dependencies')
|
28
28
|
super
|
29
29
|
|
30
30
|
@additional_args = argv.remainder!
|
31
31
|
end
|
32
32
|
|
33
33
|
def run
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
"--sources=#{sources_option(!@trunk_dependencies, @sources)}",
|
40
|
-
*@additional_args
|
41
|
-
]
|
34
|
+
argvs = [
|
35
|
+
repo,
|
36
|
+
"--sources=#{sources_option(@code_dependencies, @sources)+','+Pod::TrunkSource::TRUNK_REPO_URL}",
|
37
|
+
*@additional_args
|
38
|
+
]
|
42
39
|
|
43
|
-
|
40
|
+
argvs << spec_file if spec_file
|
44
41
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
ensure
|
52
|
-
clear_binary_spec_file_if_needed unless @reserve_created_spec
|
42
|
+
push = Pod::Command::Repo::Push.new(CLAide::ARGV.new(argvs))
|
43
|
+
push.validate!
|
44
|
+
push.run
|
53
45
|
end
|
54
46
|
|
55
47
|
private
|
@@ -17,16 +17,21 @@ module Pod
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def initialize(argv)
|
20
|
+
@name = argv.shift_argument
|
20
21
|
super
|
21
22
|
end
|
22
23
|
|
23
24
|
def run
|
24
25
|
show_output = !config.silent?
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
if @name
|
27
|
+
config.sources_manager.update(@name, show_output)
|
28
|
+
else
|
29
|
+
Parallel.each(valid_sources, in_threads: 4) do |source|
|
30
|
+
source.update(show_output)
|
31
|
+
end
|
28
32
|
end
|
29
33
|
end
|
34
|
+
|
30
35
|
end
|
31
36
|
end
|
32
37
|
end
|
@@ -12,38 +12,32 @@ module Pod
|
|
12
12
|
DESC
|
13
13
|
|
14
14
|
self.arguments = [
|
15
|
-
CLAide::Argument.new(
|
15
|
+
CLAide::Argument.new('NAME.podspec', false)
|
16
16
|
]
|
17
17
|
|
18
18
|
def self.options
|
19
19
|
[
|
20
|
-
['--release', '在 release 环境下进行 lint']
|
21
20
|
].concat(Pod::Command::Spec::Lint.options).concat(super).uniq
|
22
21
|
end
|
23
22
|
|
24
23
|
def initialize(argv)
|
25
24
|
@podspec = argv.shift_argument
|
26
|
-
@
|
27
|
-
@
|
28
|
-
@allow_prerelease = argv.flag?('allow-prerelease')
|
25
|
+
@sources = argv.option('sources') || []
|
26
|
+
@code_dependencies = argv.flag?('code-dependencies')
|
29
27
|
super
|
30
28
|
|
31
29
|
@additional_args = argv.remainder!
|
32
30
|
end
|
33
31
|
|
34
32
|
def run
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
lint.validate!
|
44
|
-
lint.run
|
45
|
-
end
|
46
|
-
end
|
33
|
+
argvs = [
|
34
|
+
"--sources=#{sources_option(@code_dependencies, @sources)+','+Pod::TrunkSource::TRUNK_REPO_URL}",
|
35
|
+
*@additional_args
|
36
|
+
]
|
37
|
+
argvs << spec_file if spec_file
|
38
|
+
lint = Pod::Command::Spec::Lint.new(CLAide::ARGV.new(argvs))
|
39
|
+
lint.validate!
|
40
|
+
lint.run
|
47
41
|
end
|
48
42
|
|
49
43
|
private
|
@@ -1,61 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'yaml'
|
2
|
-
require 'cocoapods-pahealth-bin/native/podfile'
|
3
|
-
require 'cocoapods-pahealth-bin/native/podfile_env'
|
4
|
-
require 'cocoapods/generate'
|
5
4
|
|
6
5
|
module CBin
|
7
6
|
class Config
|
8
7
|
def config_file
|
9
|
-
|
8
|
+
File.expand_path("#{Pod::Config.instance.home_dir}/bin.yml")
|
10
9
|
end
|
11
10
|
|
12
11
|
def template_hash
|
13
12
|
{
|
14
|
-
'
|
15
|
-
'code_repo_url' => { description: '私有源 Git 地址', default: 'uat环境:https://github.com/GitWangKai/ReleasePrivateRepo.git test环境:https://github.com/GitWangKai/TestPrivateRepo.git' },
|
13
|
+
'code_repo_url' => { description: '私有源 Git 地址', default: 'git@github.com/cocoapods-spec.git' }
|
16
14
|
}
|
17
15
|
end
|
18
16
|
|
19
|
-
def config_file_with_configuration_dependence(configuration_dependence)
|
20
|
-
file = config_uat_dependence_file
|
21
|
-
if configuration_dependence == "test"
|
22
|
-
file = config_test_dependence_file
|
23
|
-
puts "\n====== #{configuration_dependence} 环境 ========"
|
24
|
-
elsif configuration_dependence == "uat"
|
25
|
-
puts "\n====== #{configuration_dependence} 环境 ========"
|
26
|
-
else
|
27
|
-
raise "\n===== #{configuration_dependence} 参数有误,请检查%w[uat test]===="
|
28
|
-
end
|
29
|
-
|
30
|
-
File.expand_path("#{Pod::Config.instance.home_dir}/#{file}")
|
31
|
-
end
|
32
|
-
|
33
|
-
def configuration_dependence
|
34
|
-
#如果是dev 再去 podfile的配置文件中获取,确保是正确的, pod update时会用到
|
35
|
-
if @configuration_dependence == "uat" || @configuration_dependence == nil
|
36
|
-
if Pod::Config.instance.podfile
|
37
|
-
configuration_dependence ||= Pod::Config.instance.podfile.configuration_dependence
|
38
|
-
end
|
39
|
-
configuration_dependence ||= "uat"
|
40
|
-
@configuration_dependence = configuration_dependence
|
41
|
-
end
|
42
|
-
@configuration_dependence
|
43
|
-
end
|
44
|
-
|
45
|
-
def set_configuration_dependence(dependence)
|
46
|
-
@configuration_dependence = dependence
|
47
|
-
end
|
48
|
-
|
49
|
-
def config_test_dependence_file
|
50
|
-
"pahealth_test.yml"
|
51
|
-
end
|
52
|
-
|
53
|
-
def config_uat_dependence_file
|
54
|
-
"pahealth_uat.yml"
|
55
|
-
end
|
56
|
-
|
57
17
|
def sync_config(config)
|
58
|
-
File.open(
|
18
|
+
File.open(config_file, 'w+') do |f|
|
59
19
|
f.write(config.to_yaml)
|
60
20
|
end
|
61
21
|
end
|
@@ -114,6 +74,4 @@ module CBin
|
|
114
74
|
def self.config
|
115
75
|
@config ||= Config.new
|
116
76
|
end
|
117
|
-
|
118
|
-
|
119
77
|
end
|
@@ -10,13 +10,13 @@ module CBin
|
|
10
10
|
sources_manager.code_source
|
11
11
|
end
|
12
12
|
|
13
|
-
def valid_sources
|
13
|
+
def valid_sources(code_dependencies = false)
|
14
14
|
sources = [code_source]
|
15
15
|
sources
|
16
16
|
end
|
17
17
|
|
18
|
-
def sources_option(additional_sources)
|
19
|
-
(valid_sources.map(&:url) + Array(additional_sources)).join(',')
|
18
|
+
def sources_option(code_dependencies, additional_sources)
|
19
|
+
(valid_sources(code_dependencies).map(&:url) + Array(additional_sources)).join(',')
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
@@ -26,10 +26,6 @@ module Pod
|
|
26
26
|
set_internal_hash_value(USE_SOURCE_PODS, hash_pods_use_source)
|
27
27
|
end
|
28
28
|
|
29
|
-
def set_configuration_dependence(dependence = "uat")
|
30
|
-
set_internal_hash_value(CONFIGURATION_DEPENDENCE, dependence)
|
31
|
-
end
|
32
|
-
|
33
29
|
end
|
34
30
|
|
35
31
|
alias old_plugins plugins
|
@@ -60,10 +56,6 @@ module Pod
|
|
60
56
|
get_internal_hash_value(USE_SOURCE_PODS, []) + String(ENV[USE_SOURCE_PODS]).split('|').uniq
|
61
57
|
end
|
62
58
|
|
63
|
-
def configuration_dependence
|
64
|
-
get_internal_hash_value(CONFIGURATION_DEPENDENCE, "uat") || ENV[CONFIGURATION_DEPENDENCE] == "uat"
|
65
|
-
end
|
66
|
-
|
67
59
|
private
|
68
60
|
|
69
61
|
def valid_bin_plugin
|
@@ -2,16 +2,3 @@ require 'cocoapods-pahealth-bin/native/sources_manager'
|
|
2
2
|
require 'cocoapods-pahealth-bin/native/podfile'
|
3
3
|
require 'cocoapods'
|
4
4
|
|
5
|
-
Pod::HooksManager.register('cocoapods-pahealth-bin', :source_provider) do |context, _|
|
6
|
-
sources_manager = Pod::Config.instance.sources_manager
|
7
|
-
podfile = Pod::Config.instance.podfile
|
8
|
-
|
9
|
-
if podfile
|
10
|
-
# 添加源
|
11
|
-
added_sources = [sources_manager.trunk_source]
|
12
|
-
added_sources << sources_manager.code_source
|
13
|
-
added_sources.reverse!
|
14
|
-
|
15
|
-
added_sources.each { |source| context.add_source(source) }
|
16
|
-
end
|
17
|
-
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-pahealth-bin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitWangKai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|