forked from hughbien/thymerb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
47 lines (38 loc) · 888 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
46
47
require_relative 'lib/thyme/version'
require 'rake/testtask'
task :default => :test
desc 'Run tests'
task :test do
if file = ENV['TEST']
File.exists?(file) ? require_relative(file) : puts("#{file} doesn't exist")
else
Dir.glob('./test/*_test.rb').each { |file| require(file) }
end
end
desc 'Build gem'
task :build do
`gem build thyme.gemspec`
end
desc 'Remove build artifacts'
task :clean do
rm Dir.glob('*.gem')
end
desc 'Push gem to rubygems.org'
task :push => :build do
`gem push thyme-#{Thyme::VERSION}.gem`
end
namespace :site do
task :default => :build
desc 'Build site'
task :build do
`cd site && stasis`
end
desc 'Push site to thymerb.com'
task :push => [:clean, :build] do
`rsync -avz --delete site/public/ thymerb.com:webapps/thymerb`
end
desc 'Remove built site artifacts'
task :clean do
rm_rf 'site/public'
end
end