-
Notifications
You must be signed in to change notification settings - Fork 11
/
Rakefile
51 lines (41 loc) · 1.17 KB
/
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
48
49
50
51
require 'fileutils'
desc 'Compile all CoffeeScript files'
task :compile do
puts 'Compiling all CoffeeScript files...'
system('coffee -o tmp -c lib spec') || fail
puts 'Done.'
end
desc 'Run package specs'
task :spec do
puts 'Running package specs...'
system('apm test') || fail
end
desc 'Run CoffeeLint'
task :lint do
puts 'Running CoffeeLint...'
system('coffeelint lib spec') || fail
end
namespace :vendor do
desc 'Vendorize terminal-notifier'
task :terminal_notifier do
url = 'https://github.com/alloy/terminal-notifier/releases/download/1.5.0/terminal-notifier-1.5.0.zip'
Dir.chdir('vendor') do
Dir['*'].each do |file|
FileUtils.remove_entry_secure(file, true)
end
zip_filename = 'terminal-notifier.zip'
sh('curl', '--location', '--output', zip_filename, url)
sh('unzip', zip_filename)
end
end
end
namespace :travis do
task :prepare do
sh 'npm install --global coffee-script coffeelint'
end
task :spec do
sh 'curl -s https://raw.githubusercontent.com/atom/ci/master/build-package.sh | sh'
end
end
task default: [:compile, :spec, :lint]
task travis: ['travis:prepare', :compile, 'travis:spec', :lint]