Skip to content

Commit

Permalink
Merge pull request #10 from Itaybre/feature/config_path
Browse files Browse the repository at this point in the history
  • Loading branch information
noahsmartin authored Sep 22, 2023
2 parents d9e79c0 + eb2b396 commit 2d26a01
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions lib/fastlane/plugin/emerge/actions/emerge_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def self.run(params)
gitlab_project_id = params[:gitlab_project_id]
build_type = params[:build_type]
order_file_version = params[:order_file_version]
config_path = params[:config_path]

if file_path == nil || !File.exist?(file_path)
UI.error("Invalid input file")
Expand All @@ -46,6 +47,7 @@ def self.run(params)
FileUtils.cp(l, linkmap_folder)
end
end
copy_config(config_path, "#{d}/archive.xcarchive")
FileUtils.cp_r(file_path, application_folder)
copy_dsyms("#{absolute_path.dirname}/*.dsym", dsym_folder)
copy_dsyms("#{absolute_path.dirname}/*/*.dsym", dsym_folder)
Expand All @@ -67,6 +69,7 @@ def self.run(params)
FileUtils.cp(l, linkmap_folder)
end
end
copy_config(config_path, file_path)
Actions::ZipAction.run(
path: file_path,
output_path: zip_path,
Expand Down Expand Up @@ -136,6 +139,13 @@ def self.copy_dsyms(from, to)
end
end

def self.copy_config(config_path, tmp_dir)
if config_path != nil && File.exist?(config_path)
emerge_config_path = "#{tmp_dir}/emerge_config.yaml"
FileUtils.cp(config_path, emerge_config_path)
end
end

def self.description
"Fastlane plugin for Emerge"
end
Expand Down Expand Up @@ -211,6 +221,10 @@ def self.available_options
description: "Version of the order file to download",
optional: true,
type: String),
FastlaneCore::ConfigItem.new(key: :config_path,
description: "Path to Emerge config path",
optional: true,
type: String),
]
end

Expand Down
2 changes: 1 addition & 1 deletion lib/fastlane/plugin/emerge/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Fastlane
module Emerge
VERSION = "0.5.2"
VERSION = "0.6.0"
end
end

0 comments on commit 2d26a01

Please sign in to comment.