Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added rake task for trimming excess whitespace.

  • Loading branch information...
commit cf910511b5b6ee3a42d84e01ed807b9e257e1eaa 1 parent 495f848
Adam Milligan authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 Rakefile
View
6 Rakefile
@@ -28,7 +28,7 @@ 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
@@ -36,6 +36,10 @@ task :cruise do
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
Please sign in to comment.
Something went wrong with that request. Please try again.