зеркало из https://github.com/mislav/hub.git
improved standalone publishing
This commit is contained in:
Родитель
57bbd7807d
Коммит
1cabf45ff0
62
Rakefile
62
Rakefile
|
@ -8,34 +8,6 @@ Rake::TestTask.new do |t|
|
|||
t.verbose = false
|
||||
end
|
||||
|
||||
module Standalone
|
||||
PREAMBLE = <<-premable
|
||||
#!/usr/bin/env ruby
|
||||
#
|
||||
# This file, hub, is generated code.
|
||||
# Please DO NOT EDIT or send patches for it.
|
||||
#
|
||||
# Please take a look at the source from
|
||||
# http://github.com/defunkt/hub
|
||||
# and submit patches against the individual files
|
||||
# that build hub.
|
||||
#
|
||||
|
||||
premable
|
||||
POSTAMBLE = "Hub::Runner.execute(*ARGV)"
|
||||
end
|
||||
|
||||
desc "Build standalone script"
|
||||
task :standalone => :test do
|
||||
File.open('hub-standalone', 'w') do |f|
|
||||
f.puts Standalone::PREAMBLE
|
||||
Dir['lib/*/**'].each do |file|
|
||||
f.puts File.read(file)
|
||||
end
|
||||
f.puts Standalone::POSTAMBLE
|
||||
end
|
||||
end
|
||||
|
||||
desc "Launch Kicker (like autotest)"
|
||||
task :kicker do
|
||||
puts "Kicking... (ctrl+c to cancel)"
|
||||
|
@ -75,9 +47,11 @@ end
|
|||
desc "Publish to GitHub Pages"
|
||||
task :pages => [ :check_dirty, :standalone ] do
|
||||
`git checkout gh-pages`
|
||||
`ls -1 | grep -v docs | xargs rm -rf; mv docs/* .; rm -rf docs`
|
||||
`git add .; git commit -m "update docs"; git push origin gh-pages`
|
||||
`git add standalone`
|
||||
`git commit -m "update standalone"`
|
||||
`git push origin gh-pages`
|
||||
`git checkout master`
|
||||
puts :done
|
||||
end
|
||||
|
||||
task :check_dirty do
|
||||
|
@ -85,3 +59,31 @@ task :check_dirty do
|
|||
abort "dirty index - not publishing!"
|
||||
end
|
||||
end
|
||||
|
||||
module Standalone
|
||||
PREAMBLE = <<-premable
|
||||
#!/usr/bin/env ruby
|
||||
#
|
||||
# This file, hub, is generated code.
|
||||
# Please DO NOT EDIT or send patches for it.
|
||||
#
|
||||
# Please take a look at the source from
|
||||
# http://github.com/defunkt/hub
|
||||
# and submit patches against the individual files
|
||||
# that build hub.
|
||||
#
|
||||
|
||||
premable
|
||||
POSTAMBLE = "Hub::Runner.execute(*ARGV)"
|
||||
end
|
||||
|
||||
desc "Build standalone script"
|
||||
task :standalone => :test do
|
||||
File.open('standalone', 'w') do |f|
|
||||
f.puts Standalone::PREAMBLE
|
||||
Dir['lib/*/**'].each do |file|
|
||||
f.puts File.read(file)
|
||||
end
|
||||
f.puts Standalone::POSTAMBLE
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче