Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 12 lines (10 sloc) 0.319 kb
1 2 3 4 5 6 7 8 9 10 11 12
require 'yaml'

desc "Find and replace git urls"
task :setup do
  file_name = "server.rb"
  config = YAML.load_file("config.yml")
  text = File.read(file_name)
  text.gsub!(/##git_post_receive_url##/, config["git_post_receive_url"])
  File.open(file_name, "w") {|file| file.write(text) }
end

task :default => [:setup]
Something went wrong with that request. Please try again.