Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Commit

Permalink
fix zip bug
Browse files Browse the repository at this point in the history
  • Loading branch information
khiemns54 committed Jan 20, 2018
1 parent 7f43dfa commit 01608f2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
rebi (0.3.1)
rebi (0.3.2)
activesupport (~> 5.0)
aws-sdk-ec2 (~> 1.0)
aws-sdk-elasticbeanstalk (~> 1.0)
Expand All @@ -22,7 +22,7 @@ GEM
i18n (~> 0.7)
minitest (~> 5.1)
tzinfo (~> 1.1)
aws-partitions (1.55.0)
aws-partitions (1.56.0)
aws-sdk-core (3.14.0)
aws-partitions (~> 1.0)
aws-sigv4 (~> 1.0)
Expand Down
2 changes: 1 addition & 1 deletion lib/rebi/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Rebi
VERSION = '0.3.1'
VERSION = '0.3.2'
end
5 changes: 3 additions & 2 deletions lib/rebi/zip_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ def gen env_conf,opts={}
tmp_folder = Dir.mktmpdir
Zip::File.open(tmp_file.path) do |z|
ebextensions.each do |ex_folder|

z.remove_folder ex_folder unless ex_folder == ".ebextension"
Dir.glob("#{ex_folder}/*.config") do |fname|
z.remove_folder ex_folder unless ex_folder == ".ebextension"
next unless File.file?(fname)
next unless y = YAML::load(ErbHelper.new(File.read(fname), env_conf).result)
basename = File.basename(fname)
Expand All @@ -70,7 +71,6 @@ def gen env_conf,opts={}
z.add target, tmp_yaml
end
end

dockerrun_file = env_conf.dockerrun || "Dockerrun.aws.json"

if File.exists?(dockerrun_file)
Expand All @@ -88,6 +88,7 @@ def gen env_conf,opts={}

FileUtils.rm_rf tmp_folder


log("Zip was created in: #{Time.now - start}s", env_conf.name)
return {
label: Time.now.strftime("app_#{env_conf.name}_#{version_label}_%Y%m%d_%H%M%S"),
Expand Down

0 comments on commit 01608f2

Please sign in to comment.