-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRakefile
33 lines (26 loc) · 818 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
require 'rake'
require 'rake/contrib/ftptools'
require 'rubygems'
require 'highline/import'
$password = ""
def upload_files(path_on_server, path_on_filesystem)
if $password == ""
$password = password = ask("Please give me password for ftp!") { |q| q.echo = false }
end
Rake::FtpUploader.connect(path_on_server, "inbarush.org", "[email protected]", $password) do |ftp|
ftp.verbose = true;
ftp.upload_files(path_on_filesystem + "/*")
end
end
task :upload_flightscrapper do
puts(" ====== Uploading Flightscrapper ===== ")
upload_files("/", "./flightscrapper")
end
task :upload_skyscanner do
puts(" ====== Uploading Skyscanner =====")
upload_files("/", "./skyscanner")
end
task :upload_all => [:upload_skyscanner, :upload_flightscrapper] do
end
task :default => :upload_all do
end