pindo 4.8.5 → 4.8.6
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/pindo/command/deploy/build.rb +42 -16
- data/lib/pindo/command/deploy/cert.rb +5 -10
- data/lib/pindo/command/dev/autobuild.rb +15 -1
- data/lib/pindo/command/dev/build.rb +1 -1
- data/lib/pindo/command/dev/debug.rb +21 -24
- data/lib/pindo/command/pgyer/upload.rb +2 -1
- data/lib/pindo/module/cert/certhelper.rb +11 -3
- data/lib/pindo/module/cert/xcodecerthelper.rb +88 -17
- data/lib/pindo/module/pgyer/pgyerhelper.rb +23 -1
- data/lib/pindo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7602974c19aabb025aceb56f2f2c4580939a4648654b9074e7aaf7b4649b366
|
4
|
+
data.tar.gz: 9a7338f72073b9728753134ac626678795e890faf5e11361dc8cace4a0d947a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3aafd84653797ddd17f31e549ff714974e8329211cb7ae5cd28ad65946586f57ae62e6587c7204bb48f4f7507bb1097fba0203df8d8a0491e1a0d2623e9cee7a
|
7
|
+
data.tar.gz: 84ee12d99b2c71f249ac382f9f5e11d0bc149e5e064ef8c7b362c654d7fa4144b751da586e84d375911686c5eec0fd174cbda6a1b2b5626d6b054c159f5b6e03
|
@@ -119,7 +119,7 @@ module Pindo
|
|
119
119
|
proj_name = File.basename(project_fullname, ".xcodeproj")
|
120
120
|
project_obj = Xcodeproj::Project.open(project_fullname)
|
121
121
|
|
122
|
-
|
122
|
+
project_build_platform = project_obj.root_object.build_configuration_list.get_setting("SDKROOT")["Release"]
|
123
123
|
main_target = project_obj.targets.select { |target| target.product_type.include?(Xcodeproj::Constants::PRODUCT_TYPE_UTI[:application]) }.first
|
124
124
|
provisioning_profile_name = main_target.build_configurations.first.build_settings['PROVISIONING_PROFILE_SPECIFIER'].downcase.split(" ")
|
125
125
|
|
@@ -127,23 +127,49 @@ module Pindo
|
|
127
127
|
|
128
128
|
build_type = "app-store"
|
129
129
|
icloud_env = "Production"
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
130
|
+
|
131
|
+
if !project_build_platform.nil? && project_build_platform.eql?("macosx")
|
132
|
+
if provisioning_profile_name.include?("development")
|
133
|
+
# Mac development包
|
134
|
+
build_type = "development"
|
135
|
+
icloud_env = "Development"
|
136
|
+
elsif provisioning_profile_name.include?("appstore")
|
137
|
+
build_type = "mac-application"
|
138
|
+
icloud_env = "Production"
|
139
|
+
else
|
140
|
+
build_type = "developer-id"
|
141
|
+
icloud_env = "Production"
|
142
|
+
end
|
142
143
|
else
|
143
|
-
|
144
|
-
|
144
|
+
if provisioning_profile_name.include?("adhoc")
|
145
|
+
build_type = "ad-hoc"
|
146
|
+
icloud_env = "Development"
|
147
|
+
elsif provisioning_profile_name.include?("development")
|
148
|
+
build_type = "development"
|
149
|
+
icloud_env = "Development"
|
150
|
+
else
|
151
|
+
build_type = "app-store"
|
152
|
+
icloud_env = "Production"
|
153
|
+
end
|
145
154
|
end
|
146
155
|
|
156
|
+
# if provisioning_profile_name.include?("direct") && provisioning_profile_name.include?("macos")
|
157
|
+
# build_type = "developer-id"
|
158
|
+
# icloud_env = "Production"
|
159
|
+
# elsif provisioning_profile_name.include?("development") && provisioning_profile_name.include?("macos")
|
160
|
+
# build_type = "development"
|
161
|
+
# icloud_env = "Development"
|
162
|
+
# elsif provisioning_profile_name.include?("adhoc")
|
163
|
+
# build_type = "ad-hoc"
|
164
|
+
# icloud_env = "Development"
|
165
|
+
# elsif provisioning_profile_name.include?("development")
|
166
|
+
# build_type = "development"
|
167
|
+
# icloud_env = "Development"
|
168
|
+
# else
|
169
|
+
# build_type = "app-store"
|
170
|
+
# icloud_env = "Production"
|
171
|
+
# end
|
172
|
+
|
147
173
|
if build_type.eql?("app-store") || build_type.eql?("ad-hoc")
|
148
174
|
if File.exist?(File.join(project_path, "Unity/Data/Raw/SettingsPluginFlag.txt"))
|
149
175
|
raise Informative, "Unity代码包含测试模板,请重新导出Unity代码"
|
@@ -166,7 +192,7 @@ module Pindo
|
|
166
192
|
}
|
167
193
|
|
168
194
|
|
169
|
-
if !
|
195
|
+
if !project_build_platform.nil? && project_build_platform.eql?("macosx")
|
170
196
|
values[:output_name] = nil
|
171
197
|
values[:destination] = "generic/platform=macosx"
|
172
198
|
end
|
@@ -58,11 +58,6 @@ module Pindo
|
|
58
58
|
@build_type = "development"
|
59
59
|
end
|
60
60
|
|
61
|
-
@args_platform = "ios"
|
62
|
-
if @args_macos_flag
|
63
|
-
@args_platform = "macos"
|
64
|
-
end
|
65
|
-
|
66
61
|
end
|
67
62
|
|
68
63
|
def run
|
@@ -91,10 +86,6 @@ module Pindo
|
|
91
86
|
platform_type = "ios"
|
92
87
|
if @args_macos_flag
|
93
88
|
platform_type = "macos"
|
94
|
-
else
|
95
|
-
if @config_json && @config_json['project_info'] && @config_json['project_info']['build_type'].include?("MacOS")
|
96
|
-
platform_type = "macos"
|
97
|
-
end
|
98
89
|
end
|
99
90
|
|
100
91
|
|
@@ -134,7 +125,7 @@ module Pindo
|
|
134
125
|
if !new_project_fullname.nil? && File.exist?(new_project_fullname) && !provisioning_info_array.nil? && provisioning_info_array.size > 0
|
135
126
|
new_proj_name = File.basename(new_project_fullname, ".xcodeproj")
|
136
127
|
Funlog.instance.fancyinfo_start("正在给Xcode配置证书...")
|
137
|
-
config_project_cert(new_proj_name:new_proj_name, new_project_dir:new_project_dir, cert_type:@build_type, team_id_vaule:@team_id_vaule, provisioning_info_array:provisioning_info_array)
|
128
|
+
config_project_cert(new_proj_name:new_proj_name, new_project_dir:new_project_dir, cert_type:@build_type, platform_type:platform_type, team_id_vaule:@team_id_vaule, provisioning_info_array:provisioning_info_array)
|
138
129
|
config_infoplist_cert(new_proj_name:new_proj_name, new_project_dir:new_project_dir, icloud_id:@icloud_id, group_id:@group_id, provisioning_info_array:provisioning_info_array)
|
139
130
|
Funlog.instance.fancyinfo_success("Xcode配置证书完成!")
|
140
131
|
end
|
@@ -164,6 +155,10 @@ module Pindo
|
|
164
155
|
force_for_new_devices_flag = false
|
165
156
|
end
|
166
157
|
|
158
|
+
if platform_type.downcase.include?("macos") && build_type.eql?("adhoc")
|
159
|
+
build_type = "developer_id"
|
160
|
+
end
|
161
|
+
|
167
162
|
values = {
|
168
163
|
username:apple_id,
|
169
164
|
app_identifier: bundle_id_array,
|
@@ -114,13 +114,27 @@ module Pindo
|
|
114
114
|
args_temp << "--dev"
|
115
115
|
end
|
116
116
|
|
117
|
+
project_fullname = Dir.glob(File.join(project_dir, "/*.xcodeproj")).max_by {|f| File.mtime(f)}
|
118
|
+
if !project_fullname.nil?
|
119
|
+
project_obj = Xcodeproj::Project.open(project_fullname)
|
120
|
+
project_build_platform = project_obj.root_object.build_configuration_list.get_setting("SDKROOT")["Release"]
|
121
|
+
if !project_build_platform.nil? && project_build_platform.eql?("macosx")
|
122
|
+
@args_macos_flag = true
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
if @args_macos_flag
|
127
|
+
args_temp << "--macos"
|
128
|
+
end
|
129
|
+
|
117
130
|
Pindo::Command::Deploy::Cert::run(args_temp)
|
118
131
|
|
119
132
|
Dir.chdir(project_dir)
|
120
133
|
Pindo::Command::Deploy::Build::run(args_temp)
|
121
134
|
|
135
|
+
|
122
136
|
pindo_new_project_dir = Dir.pwd
|
123
|
-
build_path = File.join(pindo_new_project_dir, "build", "*.ipa")
|
137
|
+
build_path = File.join(pindo_new_project_dir, "build", "*.{ipa,app}")
|
124
138
|
ipa_file_upload = Dir.glob(build_path).max_by {|f| File.mtime(f)}
|
125
139
|
|
126
140
|
if !ipa_file_upload.nil? && !app_info_obj.nil?
|
@@ -58,7 +58,7 @@ module Pindo
|
|
58
58
|
|
59
59
|
|
60
60
|
pindo_new_project_dir = Dir.pwd
|
61
|
-
build_path = File.join(pindo_new_project_dir, "build", "*.ipa")
|
61
|
+
build_path = File.join(pindo_new_project_dir, "build", "*.{ipa,app}")
|
62
62
|
ipa_file_upload = Dir.glob(build_path).max_by {|f| File.mtime(f)}
|
63
63
|
|
64
64
|
if !ipa_file_upload.nil? && !app_info_obj.nil?
|
@@ -66,6 +66,17 @@ module Pindo
|
|
66
66
|
args_temp << "--dev"
|
67
67
|
end
|
68
68
|
|
69
|
+
|
70
|
+
|
71
|
+
project_fullname = Dir.glob(File.join(project_dir, "/*.xcodeproj")).max_by {|f| File.mtime(f)}
|
72
|
+
if !project_fullname.nil?
|
73
|
+
project_obj = Xcodeproj::Project.open(project_fullname)
|
74
|
+
project_build_platform = project_obj.root_object.build_configuration_list.get_setting("SDKROOT")["Release"]
|
75
|
+
if !project_build_platform.nil? && project_build_platform.eql?("macosx")
|
76
|
+
@args_macos_flag = true
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
69
80
|
if @args_macos_flag
|
70
81
|
args_temp << "--macos"
|
71
82
|
end
|
@@ -80,35 +91,22 @@ module Pindo
|
|
80
91
|
|
81
92
|
def self.modify_cert_with_project(project_dir:nil, config_file:nil)
|
82
93
|
|
83
|
-
|
84
|
-
project_fullname = ""
|
85
|
-
Dir.foreach(project_dir) do |file|
|
86
|
-
if file =~ /(.*).xcodeproj/
|
87
|
-
project_fullname = file
|
88
|
-
break;
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
94
|
+
project_fullname = Dir.glob(File.join(project_dir, "/*.xcodeproj")).max_by {|f| File.mtime(f)}
|
92
95
|
if !project_fullname.nil?
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
temp_entitlements_file = target.build_configurations.first.build_settings['CODE_SIGN_ENTITLEMENTS']
|
102
|
-
if !temp_entitlements_file.nil? && !temp_entitlements_file.empty?
|
103
|
-
entitlements_plist_path = File.join(project_dir, temp_entitlements_file)
|
104
|
-
end
|
96
|
+
|
97
|
+
entitlements_plist_path = nil
|
98
|
+
project_obj = Xcodeproj::Project.open(project_fullname)
|
99
|
+
project_obj.targets.each do |target|
|
100
|
+
if target.product_type.to_s.eql?("com.apple.product-type.application") then
|
101
|
+
temp_entitlements_file = target.build_configurations.first.build_settings['CODE_SIGN_ENTITLEMENTS']
|
102
|
+
if !temp_entitlements_file.nil? && !temp_entitlements_file.empty?
|
103
|
+
entitlements_plist_path = File.join(project_dir, temp_entitlements_file)
|
105
104
|
end
|
106
105
|
end
|
107
106
|
end
|
108
107
|
|
109
108
|
# puts entitlements_plist_path
|
110
|
-
if File.exist?(entitlements_plist_path)
|
111
|
-
|
109
|
+
if !entitlements_plist_path.nil? && File.exist?(entitlements_plist_path)
|
112
110
|
config_json = nil
|
113
111
|
if File.exist?(config_file)
|
114
112
|
config_json = JSON.parse(File.read(config_file))
|
@@ -122,7 +120,6 @@ module Pindo
|
|
122
120
|
end
|
123
121
|
end
|
124
122
|
|
125
|
-
|
126
123
|
if entitlements_plist_dict["com.apple.security.application-groups"].nil?
|
127
124
|
if !config_json.nil? && !config_json["app_info"]['app_group_id'].nil?
|
128
125
|
config_json["app_info"].delete('app_group_id')
|
@@ -86,12 +86,13 @@ module Pindo
|
|
86
86
|
|
87
87
|
current_project_dir = Dir.pwd
|
88
88
|
if @args_ipa_file.nil? || !File.exist?(@args_ipa_file)
|
89
|
-
build_path = File.join(current_project_dir, "build", "*.ipa")
|
89
|
+
build_path = File.join(current_project_dir, "build", "*.{ipa,app}")
|
90
90
|
@args_ipa_file = Dir.glob(build_path).max_by {|f| File.mtime(f)}
|
91
91
|
if @args_ipa_file.nil?
|
92
92
|
build_path = File.join(current_project_dir, "*.ipa")
|
93
93
|
@args_ipa_file = Dir.glob(build_path).max_by {|f| File.mtime(f)}
|
94
94
|
end
|
95
|
+
|
95
96
|
if !@args_ipa_file.nil?
|
96
97
|
answer = agree("需要上传的ipa文件是: #{@args_ipa_file} ?(Y/n)")
|
97
98
|
if !answer
|
@@ -66,10 +66,12 @@ module Pindo
|
|
66
66
|
|
67
67
|
cert_git_dir = cert_type.downcase
|
68
68
|
if platform_type.downcase.eql?("macos")
|
69
|
-
if
|
70
|
-
cert_git_dir = "developer_id_application"
|
71
|
-
else
|
69
|
+
if cert_type.downcase.include?("development")
|
72
70
|
cert_git_dir = "development"
|
71
|
+
elsif cert_type.downcase.eql?("appstore")
|
72
|
+
cert_git_dir = "distribution"
|
73
|
+
else
|
74
|
+
cert_git_dir = "developer_id_application"
|
73
75
|
end
|
74
76
|
else
|
75
77
|
if !cert_type.downcase.include?("development")
|
@@ -133,16 +135,22 @@ module Pindo
|
|
133
135
|
cert_sub_dir = cert_type.downcase
|
134
136
|
provision_start_name = "Development"
|
135
137
|
provision_extension_name = ".mobileprovision"
|
138
|
+
|
136
139
|
if platform_type.downcase.include?("macos")
|
137
140
|
provision_extension_name = ".provisionprofile"
|
141
|
+
|
138
142
|
if cert_type.downcase.include?("development")
|
139
143
|
provision_start_name = "Development"
|
140
144
|
cert_sub_dir = cert_type.downcase
|
145
|
+
elsif cert_type.downcase.eql?("appstore")
|
146
|
+
provision_start_name = "AppStore"
|
147
|
+
cert_sub_dir = "appstore"
|
141
148
|
else
|
142
149
|
provision_start_name = "Direct"
|
143
150
|
cert_sub_dir = "developer_id"
|
144
151
|
end
|
145
152
|
else
|
153
|
+
provision_extension_name = ".mobileprovision"
|
146
154
|
if cert_type.downcase.include?("development")
|
147
155
|
provision_start_name = "Development"
|
148
156
|
cert_sub_dir = cert_type.downcase
|
@@ -49,7 +49,7 @@ module Pindo
|
|
49
49
|
return provisioning_info_array
|
50
50
|
end
|
51
51
|
|
52
|
-
def config_project_cert(new_proj_name:nil, new_project_dir:nil, cert_type:nil, team_id_vaule:nil, provisioning_info_array:nil)
|
52
|
+
def config_project_cert(new_proj_name:nil, new_project_dir:nil, cert_type:nil, platform_type:nil, team_id_vaule:nil, provisioning_info_array:nil)
|
53
53
|
|
54
54
|
|
55
55
|
new_proj_fullname = File.join(new_project_dir, new_proj_name) + ".xcodeproj"
|
@@ -58,11 +58,36 @@ module Pindo
|
|
58
58
|
new_project_obj.root_object.build_configuration_list.set_setting('CODE_SIGN_IDENTITY[sdk=iphoneos*]', "Apple Distribution")
|
59
59
|
new_project_obj.root_object.build_configuration_list.set_setting('CODE_SIGN_IDENTITY*', "Apple Distribution")
|
60
60
|
|
61
|
-
if
|
62
|
-
new_project_obj.root_object.build_configuration_list.set_setting('CODE_SIGN_IDENTITY[sdk=iphoneos*]',
|
63
|
-
new_project_obj.root_object.build_configuration_list.
|
61
|
+
if !platform_type.nil? && platform_type.downcase.eql?("macos")
|
62
|
+
# new_project_obj.root_object.build_configuration_list.set_setting('CODE_SIGN_IDENTITY[sdk=iphoneos*]', nil)
|
63
|
+
new_project_obj.root_object.build_configuration_list.build_configurations.each do |config|
|
64
|
+
config.build_settings.delete('CODE_SIGN_IDENTITY[sdk=iphoneos*]') if config.build_settings.key?('CODE_SIGN_IDENTITY[sdk=iphoneos*]')
|
65
|
+
end
|
66
|
+
|
67
|
+
if cert_type.downcase.eql?("development")
|
68
|
+
new_project_obj.root_object.build_configuration_list.set_setting('CODE_SIGN_IDENTITY[sdk=macosx*]', "Apple Development")
|
69
|
+
new_project_obj.root_object.build_configuration_list.set_setting('CODE_SIGN_IDENTITY*', "Apple Development")
|
70
|
+
elsif cert_type.downcase.eql?("appstore")
|
71
|
+
new_project_obj.root_object.build_configuration_list.set_setting('CODE_SIGN_IDENTITY[sdk=macosx*]', "Apple Distribution")
|
72
|
+
new_project_obj.root_object.build_configuration_list.set_setting('CODE_SIGN_IDENTITY*', "Apple Distribution")
|
73
|
+
else
|
74
|
+
new_project_obj.root_object.build_configuration_list.set_setting('CODE_SIGN_IDENTITY[sdk=macosx*]', "Developer ID Application")
|
75
|
+
new_project_obj.root_object.build_configuration_list.set_setting('CODE_SIGN_IDENTITY*', "Developer ID Application")
|
76
|
+
end
|
77
|
+
else
|
78
|
+
new_project_obj.root_object.build_configuration_list.build_configurations.each do |config|
|
79
|
+
config.build_settings.delete('CODE_SIGN_IDENTITY[sdk=macosx*]') if config.build_settings.key?('CODE_SIGN_IDENTITY[sdk=macosx*]')
|
80
|
+
end
|
81
|
+
if cert_type.downcase.eql?("development")
|
82
|
+
new_project_obj.root_object.build_configuration_list.set_setting('CODE_SIGN_IDENTITY[sdk=iphoneos*]', "Apple Development")
|
83
|
+
new_project_obj.root_object.build_configuration_list.set_setting('CODE_SIGN_IDENTITY*', "Apple Development")
|
84
|
+
else
|
85
|
+
new_project_obj.root_object.build_configuration_list.set_setting('CODE_SIGN_IDENTITY[sdk=iphoneos*]', "Apple Distribution")
|
86
|
+
new_project_obj.root_object.build_configuration_list.set_setting('CODE_SIGN_IDENTITY*', "Apple Distribution")
|
87
|
+
end
|
64
88
|
end
|
65
89
|
|
90
|
+
|
66
91
|
new_project_obj.root_object.attributes['TargetAttributes'] = new_project_obj.root_object.attributes['TargetAttributes'] || {}
|
67
92
|
target_atts_obj = new_project_obj.root_object.attributes['TargetAttributes']
|
68
93
|
|
@@ -97,22 +122,64 @@ module Pindo
|
|
97
122
|
target_atts_obj[target.uuid]['DevelopmentTeam'] = team_id_vaule
|
98
123
|
target_atts_obj[target.uuid]['ProvisioningStyle'] = "Manual"
|
99
124
|
config.build_settings['DEVELOPMENT_TEAM'] = team_id_vaule
|
100
|
-
config.build_settings['DEVELOPMENT_TEAM[sdk=iphoneos*]'] = team_id_vaule
|
101
125
|
config.build_settings['CODE_SIGN_STYLE'] = "Manual"
|
102
126
|
|
103
127
|
config.build_settings['CODE_SIGN_IDENTITY'] = "Apple Distribution"
|
104
128
|
config.build_settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = "Apple Distribution"
|
105
|
-
|
106
|
-
if cert_type == "development"
|
107
|
-
config.build_settings['CODE_SIGN_IDENTITY'] = "Apple Development"
|
108
|
-
config.build_settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = "Apple Development"
|
109
|
-
end
|
110
129
|
|
111
|
-
if !
|
112
|
-
|
113
|
-
config.build_settings['
|
114
|
-
config.build_settings['
|
130
|
+
if !platform_type.nil? && platform_type.downcase.eql?("macos")
|
131
|
+
|
132
|
+
config.build_settings['DEVELOPMENT_TEAM[sdk=macosx*]'] = team_id_vaule
|
133
|
+
# config.build_settings['DEVELOPMENT_TEAM[sdk=iphoneos*]'] = nil
|
134
|
+
# config.build_settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = nil
|
135
|
+
# config.build_settings['PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]'] = nil
|
136
|
+
|
137
|
+
config.build_settings.delete('DEVELOPMENT_TEAM[sdk=iphoneos*]') if config.build_settings.key?('DEVELOPMENT_TEAM[sdk=iphoneos*]')
|
138
|
+
config.build_settings.delete('CODE_SIGN_IDENTITY[sdk=iphoneos*]') if config.build_settings.key?('CODE_SIGN_IDENTITY[sdk=iphoneos*]')
|
139
|
+
config.build_settings.delete('PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]') if config.build_settings.key?('PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]')
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
if cert_type.downcase.eql?("development")
|
144
|
+
config.build_settings['CODE_SIGN_IDENTITY'] = "Apple Development"
|
145
|
+
config.build_settings['CODE_SIGN_IDENTITY[sdk=macosx*]'] = "Apple Development"
|
146
|
+
elsif cert_type.downcase.eql?("appstore")
|
147
|
+
config.build_settings['CODE_SIGN_IDENTITY'] = "Apple Distribution"
|
148
|
+
config.build_settings['CODE_SIGN_IDENTITY[sdk=macosx*]'] = "Apple Distribution"
|
149
|
+
else
|
150
|
+
config.build_settings['CODE_SIGN_IDENTITY'] = "Developer ID Application"
|
151
|
+
config.build_settings['CODE_SIGN_IDENTITY[sdk=macosx*]'] = "Developer ID Application"
|
152
|
+
end
|
153
|
+
|
154
|
+
if !provisioning_info.nil?
|
155
|
+
config.build_settings['PRODUCT_BUNDLE_IDENTIFIER'] = provisioning_info["bundle_id"]
|
156
|
+
config.build_settings['PROVISIONING_PROFILE_SPECIFIER'] = provisioning_info['profile_name']
|
157
|
+
config.build_settings['PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]'] = provisioning_info['profile_name']
|
158
|
+
end
|
159
|
+
|
160
|
+
else
|
161
|
+
config.build_settings['DEVELOPMENT_TEAM[sdk=iphoneos*]'] = team_id_vaule
|
162
|
+
# config.build_settings['DEVELOPMENT_TEAM[sdk=macosx*]'] = ""
|
163
|
+
# config.build_settings['CODE_SIGN_IDENTITY[sdk=macosx*]'] = ""
|
164
|
+
# config.build_settings['PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]'] = ""
|
165
|
+
|
166
|
+
config.build_settings.delete('DEVELOPMENT_TEAM[sdk=macosx*]') if config.build_settings.key?('DEVELOPMENT_TEAM[sdk=macosx*]')
|
167
|
+
config.build_settings.delete('CODE_SIGN_IDENTITY[sdk=macosx*]') if config.build_settings.key?('CODE_SIGN_IDENTITY[sdk=macosx*]')
|
168
|
+
config.build_settings.delete('PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]') if config.build_settings.key?('PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]')
|
115
169
|
|
170
|
+
|
171
|
+
if cert_type.downcase.eql?("development")
|
172
|
+
config.build_settings['CODE_SIGN_IDENTITY'] = "Apple Development"
|
173
|
+
config.build_settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = "Apple Development"
|
174
|
+
else
|
175
|
+
config.build_settings['CODE_SIGN_IDENTITY'] = "Apple Distribution"
|
176
|
+
config.build_settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = "Apple Distribution"
|
177
|
+
end
|
178
|
+
if !provisioning_info.nil?
|
179
|
+
config.build_settings['PRODUCT_BUNDLE_IDENTIFIER'] = provisioning_info["bundle_id"]
|
180
|
+
config.build_settings['PROVISIONING_PROFILE_SPECIFIER'] = provisioning_info['profile_name']
|
181
|
+
config.build_settings['PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]'] = provisioning_info['profile_name']
|
182
|
+
end
|
116
183
|
end
|
117
184
|
end
|
118
185
|
end
|
@@ -235,10 +302,12 @@ module Pindo
|
|
235
302
|
|
236
303
|
cert_sub_dir = cert_type.downcase
|
237
304
|
if platform_type.downcase.eql?("macos")
|
238
|
-
if
|
239
|
-
cert_sub_dir = "developer_id_application"
|
240
|
-
else
|
305
|
+
if cert_type.downcase.include?("development")
|
241
306
|
cert_sub_dir = "development"
|
307
|
+
elsif cert_type.downcase.eql?("appstore")
|
308
|
+
cert_sub_dir = "distribution"
|
309
|
+
else
|
310
|
+
cert_sub_dir = "developer_id_application"
|
242
311
|
end
|
243
312
|
else
|
244
313
|
if !cert_type.downcase.include?("development")
|
@@ -323,6 +392,8 @@ module Pindo
|
|
323
392
|
if platform_type.downcase.include?("macos")
|
324
393
|
if cert_type.downcase.include?("development")
|
325
394
|
provision_start_name = "development"
|
395
|
+
elsif cert_type.downcase.eql?("appstore")
|
396
|
+
provision_start_name = "appstore"
|
326
397
|
else
|
327
398
|
provision_start_name = "direct"
|
328
399
|
end
|
@@ -145,7 +145,29 @@ module Pindo
|
|
145
145
|
end
|
146
146
|
|
147
147
|
def start_upload(app_info_obj:nil, ipa_file_upload:nil, description:nil)
|
148
|
+
if !ipa_file_upload.nil? && File.extname(ipa_file_upload).eql?(".app")
|
149
|
+
mac_app_path = ipa_file_upload
|
150
|
+
ipa_base_dir = File.dirname(ipa_file_upload)
|
151
|
+
ipa_base_name = File.basename(ipa_file_upload, File.extname(ipa_file_upload))
|
152
|
+
ipa_file_upload = File.join(ipa_base_dir, ipa_base_name + ".zip")
|
153
|
+
if File.exist?(ipa_file_upload)
|
154
|
+
FileUtils.rm_rf(ipa_file_upload)
|
155
|
+
end
|
156
|
+
|
157
|
+
current_dir = Dir.pwd
|
158
|
+
if File.exist?(ipa_base_dir)
|
159
|
+
Dir.chdir(ipa_base_dir)
|
160
|
+
base_name = File.basename(mac_app_path)
|
161
|
+
command = "zip -qry \"#{ipa_file_upload}\" \"#{base_name}\""
|
162
|
+
puts command
|
163
|
+
system command
|
164
|
+
Dir.chdir(current_dir)
|
165
|
+
end
|
166
|
+
end
|
148
167
|
|
168
|
+
unless !ipa_file_upload.nil? && File.exist?(ipa_file_upload)
|
169
|
+
return
|
170
|
+
end
|
149
171
|
args_ipa_file_dir = File.expand_path(File::dirname(ipa_file_upload))
|
150
172
|
ipa_file_upload=File.join(args_ipa_file_dir, File.basename(ipa_file_upload))
|
151
173
|
current_project_dir = Dir.pwd
|
@@ -203,7 +225,7 @@ module Pindo
|
|
203
225
|
# aws_client = AWSS3Client.new
|
204
226
|
aws_client = PgyerUploadClient.new
|
205
227
|
upload_res = aws_client.upload_file(binary_file:ipa_file_upload)
|
206
|
-
|
228
|
+
puts upload_res
|
207
229
|
attach_key_url = nil
|
208
230
|
attachFileUrls = []
|
209
231
|
|
data/lib/pindo/version.rb
CHANGED