Revert "add lanes generator"

This reverts commit f1cbf04318.
This commit is contained in:
Sergey Kopytov 2019-09-17 11:21:30 +03:00
parent f1cbf04318
commit e628d37039
1 changed files with 0 additions and 30 deletions

View File

@ -1,30 +0,0 @@
require 'json'
# call python script and generate configs to config file
system("python gen_configurations.py > configs_data.json")
# generate fastlane lane block
def generate_lane(lane_name)
first_line = "lane :" + lane_name + " do |options|\n"
second_line = "\tbuildConfiguration(options)\n"
third_line = "end\n"
separator = "\n"
return first_line + second_line + third_line + separator
end
# open configs for rendering
configs = JSON.load(File.open("configs_data.json"))["configurations"]
# map configs to lanes
lanes = configs.map { |config| generate_lane(config["name"]) }
# make all lanes uniq
lanes.uniq!
# write lanes to file
File.open("lanes_template", 'w') { |file|
file.puts(lanes)
}
# remove config file, it's trash
File.delete("configs_data.json") if File.exist?("configs_data.json")