-
Notifications
You must be signed in to change notification settings - Fork 7
/
Rakefile
38 lines (28 loc) · 744 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
require 'json'
task :default => :run
desc "install and run the application on the emulator or device"
task :run => ['install', 'launch', 'tail']
task :launch do
puts system("palm-launch #{app_id}")
end
task :tail do
system("palm-log -f #{app_id}")
end
desc 'package the application'
task :package do
puts system('palm-package -o /tmp . --exclude-from="config/excludes.txt" --use-v1-format')
end
desc 'install the application on the emulator'
task :install => :package do
puts system("palm-install -r #{app_id}")
puts system("palm-install /tmp/#{app_id}_#{version}_all.ipk")
end
def app_info
@app_info ||= JSON.parse(File.open('appinfo.json').read)
end
def app_id
app_info['id']
end
def version
app_info['version']
end