lib/xcbuildfaster/project_modifier.rb in XCBuildFaster-0.0.1 vs lib/xcbuildfaster/project_modifier.rb in XCBuildFaster-0.0.2

- old
+ new

@@ -24,10 +24,19 @@ private def fastify(project) project.targets.each do |target| scripts = target.shell_script_build_phases target.shell_script_build_phases.each do |shell_script_build_phase| - shell_script_build_phase.shell_script = "# WARNING: Shell script removed via XCBuildFaster! You probably don't want to commit this." + script = shell_script_build_phase.shell_script + + # Comment out each line of the script + script = script.lines.map { |line| "# #{line}" }.join + + # Add a warning + warning = "echo 'warning: #{target.to_s} modified by xcbuildfaster. Your run script(s) have been replaced with this warning, you probably dont want to commit this!'" + script = "#{warning}\n#{script}" + + shell_script_build_phase.shell_script = script end target.build_configurations.each do |build_config| static_analysis_keys = ['RUN_CLANG_STATIC_ANALYZER', 'CLANG_ANALYZER_DEADCODE_DEADSTORES', \ No newline at end of file