Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor-e committed Mar 19, 2024
1 parent 6dcdc0d commit b6e4703
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions lib/fastlane/plugin/emerge/actions/emerge_snapshot_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,18 @@ def self.run(params)
team_id = params[:team_id] || CredentialsManager::AppfileConfig.try_fetch_value(:team_id)

Dir.mktmpdir do |temp_dir|
archive_path = "#{temp_dir}/build/snapshot.xcarchive"
other_action.gym(
archive_name = "#{scheme}-Emerge-Snapshots"
archive_path = "#{temp_dir}/build/#{archive_name}.xcarchive"
make_debug_build(
scheme: scheme,
configuration: configuration,
skip_codesigning: true,
clean: true,
export_method: "development",
export_team_id: team_id,
skip_package_ipa: true,
output_directory: "#{temp_dir}/build",
team_id: team_id,
archive_path: archive_path
)

Helper::EmergeHelper.copy_config(config_path, archive_path)
Xcodeproj::Plist.write_to_path({ "NAME" => "Emerge Upload" }, "#{archive_path}/Info.plist")

zip_file_path = "#{temp_dir}/build/archive.xcarchive.zip"
zip_file_path = "#{temp_dir}/build/#{archive_name}.xcarchive.zip"
ZipAction.run(
path: archive_path,
output_path: zip_file_path,
Expand All @@ -67,6 +62,19 @@ def self.run(params)
end
end

def self.make_debug_build(scheme:, configuration:, team_id:, archive_path:)
other_action.gym(
scheme: scheme,
configuration: configuration,
skip_codesigning: true,
clean: true,
export_method: "development",
export_team_id: team_id,
skip_package_ipa: true,
archive_path: archive_path
)
end

def self.description
"Fastlane plugin for Emerge to generate iOS snapshots"
end
Expand Down

0 comments on commit b6e4703

Please sign in to comment.