Try to make sure submodules get checked out before packaging.
This can't happen if Haml is being packaged from e.g. a GitHub tarball, which isn't a git repo but also doesn't include submodules. In these cases, a runtime error will be generated for --watch, which will instruct the user to install FSSM as a gem.
This commit is contained in:
parent
899285eaea
commit
6248ca3721
13
Rakefile
13
Rakefile
|
@ -57,6 +57,7 @@ task :revision_file do
|
|||
end
|
||||
end
|
||||
Rake::Task[:package].prerequisites.insert(0, :revision_file)
|
||||
Rake::Task[:package].prerequisites.insert(0, :submodules)
|
||||
|
||||
# We also need to get rid of this file after packaging.
|
||||
at_exit { File.delete('REVISION') rescue nil }
|
||||
|
@ -167,6 +168,18 @@ def mode_unchanged?(mode, version)
|
|||
return false
|
||||
end
|
||||
|
||||
task :submodules do
|
||||
if File.exist?(File.dirname(__FILE__) + "/.git")
|
||||
sh %{git submodule sync}
|
||||
sh %{git submodule update --init}
|
||||
elsif !File.exist?(File.dirname(__FILE__) + "/vendor/fssm/lib")
|
||||
warn <<WARN
|
||||
WARNING: vendor/fssm doesn't exist, and this isn't a git repository so
|
||||
I can't get it automatically!
|
||||
WARN
|
||||
end
|
||||
end
|
||||
|
||||
task :release_edge do
|
||||
ensure_git_cleanup do
|
||||
puts "#{'=' * 50} Running rake release_edge"
|
||||
|
|
Loading…
Reference in New Issue