forked from heroku/legacy-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zip.rake
28 lines (24 loc) · 813 Bytes
/
zip.rake
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
require "zip/zip"
file pkg("heroku-#{version}.zip") => distribution_files("zip") do |t|
tempdir do |dir|
mkchdir("heroku-client") do
assemble_distribution
assemble_gems
rm_rf "bin"
Zip::ZipFile.open(t.name, Zip::ZipFile::CREATE) do |zip|
Dir["{data,lib,vendor}/**/*"].each do |file|
zip.add(file, file) { true }
end
end
end
end
end
task "zip:build" => pkg("heroku-#{version}.zip")
task "zip:clean" do
clean pkg("heroku-#{version}.zip")
end
task "zip:release" => "zip:build" do |t|
store pkg("heroku-#{version}.zip"), "heroku-client/heroku-client-#{version}.zip"
store pkg("heroku-#{version}.zip"), "heroku-client/heroku-client-beta.zip" if beta?
store pkg("heroku-#{version}.zip"), "heroku-client/heroku-client.zip" unless beta?
end