Skip to content

Commit 37ee367

Browse files
committed
Merge 68524510-zip-file to master
[Completes #68524510]
2 parents bf0d9a6 + 272b766 commit 37ee367

7 files changed

Lines changed: 16 additions & 5 deletions

File tree

.idea/dictionaries/bhale.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ group :development do
44
gem 'rake'
55
gem 'redcarpet'
66
gem 'rubocop'
7+
gem 'rubyzip'
78
gem 'yard'
89
end
910

Gemfile.lock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ GEM
4343
ruby-debug-ide (0.4.22)
4444
rake (>= 0.8.1)
4545
ruby-progressbar (1.4.2)
46+
rubyzip (1.1.2)
4647
safe_yaml (1.0.1)
4748
simplecov (0.8.2)
4849
docile (~> 1.1.0)
@@ -67,6 +68,7 @@ DEPENDENCIES
6768
rubocop
6869
ruby-debug-base19x (>= 0.11.30.pre)
6970
ruby-debug-ide
71+
rubyzip
7072
simplecov
7173
tee
7274
webmock

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ The online package is a version of the buildpack that is as minimal as possible
7676
bundle install
7777
bundle exec rake package
7878
...
79-
Creating build/java-buildpack-cfd6b17.tar.gz
79+
Creating build/java-buildpack-cfd6b17.zip
8080
```
8181

8282
### Offline Package
@@ -86,7 +86,7 @@ The offline package is a version of the buildpack designed to run without access
8686
bundle install
8787
bundle exec rake package OFFLINE=true
8888
...
89-
Creating build/java-buildpack-offline-cfd6b17.tar.gz
89+
Creating build/java-buildpack-offline-cfd6b17.zip
9090
```
9191

9292
### Package Versioning
@@ -96,7 +96,7 @@ Keeping track of different versions of the buildpack can be difficult. To help
9696
bundle install
9797
bundle exec rake package VERSION=2.1
9898
...
99-
Creating build/java-buildpack-2.1.tar.gz
99+
Creating build/java-buildpack-2.1.zip
100100
```
101101

102102
## Running Tests

java-buildpack.iml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@
293293
<orderEntry type="library" scope="PROVIDED" name="ruby-debug-base19x (v0.11.30.pre15, rbenv: 1.9.3-p545) [gem]" level="application" />
294294
<orderEntry type="library" scope="PROVIDED" name="ruby-debug-ide (v0.4.22, rbenv: 1.9.3-p545) [gem]" level="application" />
295295
<orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.4.2, rbenv: 1.9.3-p545) [gem]" level="application" />
296+
<orderEntry type="library" scope="PROVIDED" name="rubyzip (v1.1.2, rbenv: 1.9.3-p545) [gem]" level="application" />
296297
<orderEntry type="library" scope="PROVIDED" name="safe_yaml (v1.0.1, rbenv: 1.9.3-p545) [gem]" level="application" />
297298
<orderEntry type="library" scope="PROVIDED" name="simplecov (v0.8.2, rbenv: 1.9.3-p545) [gem]" level="application" />
298299
<orderEntry type="library" scope="PROVIDED" name="simplecov-html (v0.8.0, rbenv: 1.9.3-p545) [gem]" level="application" />

rakelib/package.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ module Package
3434

3535
VERSION = (ENV['VERSION'] || HASH).freeze
3636

37-
PACKAGE_NAME = "#{BUILD_DIR}/java-buildpack#{'-offline' if OFFLINE}-#{VERSION}.tar.gz".freeze
37+
PACKAGE_NAME = "#{BUILD_DIR}/java-buildpack#{'-offline' if OFFLINE}-#{VERSION}.zip".freeze
3838

3939
end

rakelib/package_task.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
require 'rake/clean'
1818
require 'rake/tasklib'
1919
require 'rakelib/package'
20+
require 'zip'
2021

2122
module Package
2223

@@ -35,7 +36,12 @@ def initialize
3536

3637
task PACKAGE_NAME => [BUILD_DIR, STAGING_DIR] do |t|
3738
rake_output_message "Creating #{t.name}"
38-
`tar czf #{t.name} -C #{STAGING_DIR} .`
39+
40+
Zip::File.open(t.name, Zip::File::CREATE) do |zipfile|
41+
Dir[File.join(STAGING_DIR, '**', '**')].each do |file|
42+
zipfile.add(file.sub("#{STAGING_DIR}/", ''), file)
43+
end
44+
end
3945
end
4046
end
4147

0 commit comments

Comments
 (0)