Skip to content

Instantly share code, notes, and snippets.

@mileszs
Created February 8, 2011 20:47
Show Gist options
  • Select an option

  • Save mileszs/817200 to your computer and use it in GitHub Desktop.

Select an option

Save mileszs/817200 to your computer and use it in GitHub Desktop.
desc "Minify JS and CSS, commit the results, and push it all"
task :minify_assets do
`jammit`
status_output = `git status`
unless status_output =~ /nothing to commit/ && status_output !~ /public\/assets/
`git add public/assets/`
`git commit -m "Re-minify JS and CSS before deployment"`
`git push origin master`
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment