Code correction
This commit is contained in:
parent
67418eefc3
commit
46be166a04
|
|
@ -106,14 +106,14 @@ private_lane :addShield do |options|
|
|||
end
|
||||
end
|
||||
|
||||
private_lane lane :uploadFeaturesToProject do |options|
|
||||
private_lane :uploadFeaturesToProject do |options|
|
||||
app_target_folder_name = options[:appName] || $appName
|
||||
|
||||
project_features_file_path = File.expand_path "../#{app_target_folder_name}/Resources/Features.json"
|
||||
common_features_file_path = File.expand_path "../common/build_options/Features.yaml"
|
||||
|
||||
builder_features_list = options[:features] # [ "Feature1", "Feature2", "Feature3" ]
|
||||
|
||||
builder_features_list = options[:features].split(",").map { |feature_name| feature_name.strip } # [ "Feature1", "Feature2", "Feature3" ]
|
||||
|
||||
Touchlane::Features.generate_features_file_in_project(builder_features_list, common_features_file_path, project_features_file_path)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ module Touchlane
|
|||
|
||||
# Generate JSON from feature names
|
||||
feature_bodies = builder_features_list.map { |feature_name| { :name => feature_name, :enabled => true} }
|
||||
features = { :features => features_body }
|
||||
features = { :features => feature_bodies }
|
||||
features_json = JSON.pretty_generate(features)
|
||||
|
||||
unless File.exists? project_features_file_path
|
||||
|
|
@ -32,7 +32,7 @@ module Touchlane
|
|||
unless File.exists? path
|
||||
raise "Unable to load features from file at #{path}"
|
||||
else
|
||||
YAML.load_file(path)["features"]
|
||||
YAML.load_file(path)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue