Permalink
Browse files

Added rake task for trimming excess whitespace.

  • Loading branch information...
1 parent 495f848 commit cf910511b5b6ee3a42d84e01ed807b9e257e1eaa Adam Milligan committed Apr 21, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 Rakefile
View
@@ -28,14 +28,18 @@ def output_file(target)
output_file
end
-task :default => [:specs, :uispecs]
+task :default => [:trim_whitespace, :specs, :uispecs]
task :cruise do
Rake::Task[:clean].invoke
Rake::Task[:build_all].invoke
Rake::Task[:specs].invoke
Rake::Task[:uispecs].invoke
end
+task :trim_whitespace do
+ system_or_exit(%Q[git status --short | awk '{if ($1 != "D" && $1 != "R") print $2}' | grep -e '.*\.[mh]$' | xargs sed -i '' -e 's/ / /g;s/ *$//g;'])
+end
+
task :clean do
system_or_exit(%Q[xcodebuild -project #{PROJECT_NAME}.xcodeproj -alltargets -configuration #{CONFIGURATION} clean SYMROOT=#{BUILD_DIR}], output_file("clean"))
end

0 comments on commit cf91051

Please sign in to comment.