forked from gitready/gitready
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
28 lines (25 loc) · 699 Bytes
/
Rakefile
File metadata and controls
28 lines (25 loc) · 699 Bytes
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
desc "deploy site to gitready.com"
desc "Unpublish all posts"
task :unpublish do
Dir["_posts/*.textile"].each do |post|
puts "Unpublishing #{post}"
lines = File.readlines(post)
lines.insert(1, "published: false\n")
File.open(post, "w") { |f| f.write lines.join }
end
end
LANGS = %w[de en es fr it ko nl pt-br ru sv]
desc "setup all branches"
task :setup do
LANGS.each do |lang|
system("git checkout -t -b #{lang} origin/#{lang}")
system("git remote add #{lang} git@github.com:gitready/#{lang}.git")
end
system("git checkout en")
end
desc "publish to all branches"
task :publish do
LANGS.each do |lang|
system("git push #{lang} #{lang}:gh-pages")
end
end