-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathRakefile
30 lines (25 loc) · 971 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
require "bundler/setup"
require "middleman-gh-pages"
require "cgi"
desc "Opens the development preview in your default browser"
task :open do
sh "mkdir -p tmp && touch tmp/restart.txt"
base = File.open(".powder").read.strip
sh "open http://#{base}.test/"
end
desc "Ping relevant services after new content is published."
task :ping do
ping "http://feedburner.google.com/fb/a/pingSubmit?bloglink=http%3A%2F%2Ffeeds.feedburner.com%2Fryanmcgeary"
ping "http://www.google.com/webmasters/sitemaps/ping?sitemap=#{CGI.escape "http://ryan.mcgeary.org/sitemap.xml"}"
puts "\nDon't forget to submit to http://www.rubyflow.com/ if appropriate too!"
end
desc "Opens the development preview in your default browser"
multitask :default => [:open]
def ping(url)
require 'open-uri'
print "\nPinging #{url[0..70]}... "
io = open(url)
puts io.status[0]
end
# Ensure builds are skipped when pushing to the gh-pages branch
ENV["COMMIT_MESSAGE_SUFFIX"] = "[skip ci]"