Skip to content

Commit b6e4703

Browse files
committed
Cleanup
1 parent 6dcdc0d commit b6e4703

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

lib/fastlane/plugin/emerge/actions/emerge_snapshot_action.rb

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,18 @@ def self.run(params)
2828
team_id = params[:team_id] || CredentialsManager::AppfileConfig.try_fetch_value(:team_id)
2929

3030
Dir.mktmpdir do |temp_dir|
31-
archive_path = "#{temp_dir}/build/snapshot.xcarchive"
32-
other_action.gym(
31+
archive_name = "#{scheme}-Emerge-Snapshots"
32+
archive_path = "#{temp_dir}/build/#{archive_name}.xcarchive"
33+
make_debug_build(
3334
scheme: scheme,
3435
configuration: configuration,
35-
skip_codesigning: true,
36-
clean: true,
37-
export_method: "development",
38-
export_team_id: team_id,
39-
skip_package_ipa: true,
40-
output_directory: "#{temp_dir}/build",
36+
team_id: team_id,
4137
archive_path: archive_path
4238
)
43-
4439
Helper::EmergeHelper.copy_config(config_path, archive_path)
4540
Xcodeproj::Plist.write_to_path({ "NAME" => "Emerge Upload" }, "#{archive_path}/Info.plist")
4641

47-
zip_file_path = "#{temp_dir}/build/archive.xcarchive.zip"
42+
zip_file_path = "#{temp_dir}/build/#{archive_name}.xcarchive.zip"
4843
ZipAction.run(
4944
path: archive_path,
5045
output_path: zip_file_path,
@@ -67,6 +62,19 @@ def self.run(params)
6762
end
6863
end
6964

65+
def self.make_debug_build(scheme:, configuration:, team_id:, archive_path:)
66+
other_action.gym(
67+
scheme: scheme,
68+
configuration: configuration,
69+
skip_codesigning: true,
70+
clean: true,
71+
export_method: "development",
72+
export_team_id: team_id,
73+
skip_package_ipa: true,
74+
archive_path: archive_path
75+
)
76+
end
77+
7078
def self.description
7179
"Fastlane plugin for Emerge to generate iOS snapshots"
7280
end

0 commit comments

Comments
 (0)