-
Notifications
You must be signed in to change notification settings - Fork 4
/
Rakefile
66 lines (56 loc) · 1.89 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
require 'bundler'
require 'open3'
require './ZipFileGenerator.rb'
task :default => :serve
desc "Builds the Project for deployment"
task :build_proj do
FileUtils.rm_r(Dir.glob('./january/export'))
FileUtils.rm_r(Dir.glob('./january-site/january.swf'))
FileUtils.rm_r(Dir.glob('./january-site/downloads/january-win.zip'))
FileUtils.rm_r(Dir.glob('./january-site/downloads/january-mac.zip'))
puts "Building Project..."
results, error, status = Open3.capture3("haxelib", "run", "flixel-tools", "buildprojects", "flash", "-dir", ".")
puts results
if !status.success?
puts "ERROR! - #{error}"
exit 1
end
##
# results, error, status = Open3.capture3("haxelib", "run", "flixel-tools", "buildprojects", "windows", "-dir", ".")
# puts results
# if !status.success?
# puts "ERROR! - #{error}"
# exit 1
# end
# results, error, status = Open3.capture3("haxelib", "run", "flixel-tools", "buildprojects", "mac", "-dir", ".")
# puts results
# if !status.success?
# puts "ERROR! - #{error}"
# exit 1
# end
#
puts "Done Building Project...";
FileUtils.mv('./january/export/flash/bin/january.swf', './january-site/january.swf')
##
# FileUtils.mkdir('./january-site/downloads')
# zipWin = ZipFileGenerator.new('./january/export/windows/cpp/bin', './january-site/downloads/january-win.zip')
# zipWin.write();
# zipMac = ZipFileGenerator.new('./january/export/mac64/neko/bin', './january-site/downloads/january-mac.zip')
# zipMac.write();
#
end
desc "Build the site with Jekyll"
task :build_site do
jekyll('build')
end
desc "For Testing, just build the project and serve the site to localhost:4000"
task :serve => [:build_proj, :serve_site]
desc "Just serves the site, does not rebuild the project"
task :serve_site do
jekyll('serve')
end
desc "Build and Deploy the entire site"
task :deploy => [:build_proj, :build_site]
def jekyll(opts = '')
sh 'jekyll ' + opts + ' -s january-site'
end