Interesting discussion in that thread, thanks for the link Sean.

At the moment we're not putting any development effort into allowing
user code into the server-side receive hooks, as this has a lot of
deep design and security ramifications that make it a pretty massive
project.  I think it's an interesting idea and we'll continue to think
about it, but in the meantime I'd be more interested in seeing other
options.  The plugin which compiles the stylesheets on the fly and
caches them in varnish, for example, feels like a better solution to
me - as Ethan put it, an "idiomatically appropriate solution."

If you're looking for the absolute easiest way, without changing any
of your app or framework code, the thing to do is put the hook as a
pre-commit on your own Git repo.  For example:

$ cat > .git/hooks/pre-commit
#!/usr/bin/env ruby

Dir['app/stylesheets/**/*.sass'].each do |sass|
        basename = sass.gsub(/app\/stylesheets\//, '').gsub(/\.sass$/, '')
        next if basename.match(/^_/)   # skip includes
        css = "public/stylesheets/#{basename}.css"
        puts "Compiling #{sass} -> #{css}"
        system "sass #{sass} #{css}"
        system "git add #{css}"
end
[Ctrl-D]
$ chmod 755 .git/hooks/pre-commit

Adam

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to