ci: cn、com区域打包逻辑分离。
This commit is contained in:
parent
e42d4be863
commit
01f43048ea
@ -153,10 +153,10 @@ platform :android do
|
|||||||
puts "start prepare zone: #{zone},pathList:#{pathList},extensions:#{extensions}"
|
puts "start prepare zone: #{zone},pathList:#{pathList},extensions:#{extensions}"
|
||||||
regexp_List = [/#<#{zone}>.*?#<\/#{zone}>/m,/\/\/\<#{zone}\>.*?\/\/\<\/#{zone}\>/m]
|
regexp_List = [/#<#{zone}>.*?#<\/#{zone}>/m,/\/\/\<#{zone}\>.*?\/\/\<\/#{zone}\>/m]
|
||||||
UI.message("Processed RegExpList: #{regexp_List}")
|
UI.message("Processed RegExpList: #{regexp_List}")
|
||||||
def process_file(file_path, regexp_List)
|
def process_file(file_path, regexpList)
|
||||||
content = File.read(file_path)
|
content = File.read(file_path)
|
||||||
regexp_List.each do |tag|
|
regexpList.each do |tag|
|
||||||
content = content.gsub(tag)
|
content = content.gsub(tag,'><')
|
||||||
end
|
end
|
||||||
File.write(file_path, content)
|
File.write(file_path, content)
|
||||||
UI.message("Processed file: #{file_path},content : #{content}")
|
UI.message("Processed file: #{file_path},content : #{content}")
|
||||||
@ -167,11 +167,11 @@ platform :android do
|
|||||||
if File.directory?(realPath)
|
if File.directory?(realPath)
|
||||||
Dir.glob("#{realPath}/**/*").each do |file|
|
Dir.glob("#{realPath}/**/*").each do |file|
|
||||||
if extensions.include?(File.extname(file))
|
if extensions.include?(File.extname(file))
|
||||||
process_file(file)
|
process_file(file,regexp_List)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elsif File.file?(realPath)
|
elsif File.file?(realPath)
|
||||||
process_file(realPath)
|
process_file(realPath,regexp_List)
|
||||||
else
|
else
|
||||||
UI.message("Invalid path: #{realPath}")
|
UI.message("Invalid path: #{realPath}")
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user