forked from papers-we-love/papers-we-love.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
45 lines (36 loc) · 1006 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
###
# Papers We Love Rake
###
require 'date'
MM = 'bundle exec middleman'
desc 'Build PWL.org'
task :build do
status = system("#{MM} build")
puts status ? 'Build OK' : 'Build FAIL!'
end
desc 'Run the preview server at http://localhost:4567'
task :preview do
system("#{MM} server")
end
desc 'Deploy PWL.org'
task :deploy do
status = system("#{MM} deploy")
puts status ? 'Deploy OK' : 'Deploy FAIL!'
end
desc 'Update Meetup.com API data'
task :update do
status = system("#{MM} update")
puts status ? 'Data update OK' : 'Data update FAIL!'
end
desc 'Create/Update Upcoming meetups post'
task :upcoming do
status = system("#{MM} upcoming -m #{Date.today.month}")
puts status ? 'Upcoming meetups OK' : 'Upcoming meetups FAIL!'
end
desc 'Pull down the latest changes in the repo'
task :pull do
status = system('git pull');
puts status ? 'Git pull OK' : 'Git pull FAIL!'
end
desc 'Rebuild the site using updated Meetup.com information'
task refresh: %w[pull update upcoming deploy]