Sha256: 930065a1ab103e26164360309b6260633f0352c875436cf47e9d97ce6c925ee4

Contents?: true

Size: 666 Bytes

Versions: 4

Compression:

Stored size: 666 Bytes

Contents

# encoding: utf-8

dependencies = FileList["vendor/*/.git"].sub(/\/\.git$/, "")

desc "Regenerate deps.rip"
file "deps.rip" => dependencies do
  commits = Hash.new
  commits = dependencies.inject(Hash.new) do |hash, path|
    Dir.chdir(path) do
      revision = %x(git show | head -1).chomp.sub("commit ", "")
      hash[File.basename(path)] = revision
      hash
    end
  end
  template = File.read("deps.rip.rbe")
  deps_rip = eval("%Q{#{template}}")
  File.open("deps.rip", "w") do |file|
    file.puts(deps_rip)
  end
  sh "chmod +x deps.rip"
  sh "git commit deps.rip -m 'Updated deps.rip'"
end

# register task
Task[:release].dependencies.unshift("deps.rip")

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nake-0.0.3 lib/nake/tasks/rip.rb
nake-0.0.3.pre lib/nake/tasks/rip.rb
nake-0.0.2 lib/nake/tasks/rip.rb
nake-0.0.2.pre lib/nake/tasks/rip.rb