shiprails 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1878eb1296320d879905bda3093f0af3e5298398
4
- data.tar.gz: e79061e717bf641b91d9d5df435f33bf1eefa6e4
3
+ metadata.gz: 0ee7bd51be61d4b3ce92812299c11054c607cf63
4
+ data.tar.gz: 8d6de7fd6e03680eac37ea9f14d4b35ebc036136
5
5
  SHA512:
6
- metadata.gz: 7f3080cb6c49ab53da8d051b21d8f2338106abe3a1f5286cda7eaf8952f8b9a3b4059f3be770aa18b252c585b7355cb2ccd51c087b5e184e23cb71df9d79112b
7
- data.tar.gz: b52e0f417d1858d24173a60ffb6af5140622d48970563fb1bd2942a95c486d80468e20459be478ca11b9709ac7f575af144ac36fb0ef80a34a9e66132cded8c7
6
+ metadata.gz: 21c394cc17c4d0045a999b9d855b47c13e285a35a65c66c04bd4b2d80983968e29cd4e2932e84e7974b9b26d1afdd1201553e48e5d95716e5e087e9987121594
7
+ data.tar.gz: a4674f76b93e39d12d7ccc222e2b431dbf1bd39e3bfedd9e3ddd57015a8ab4719cae455477b995c63334378d11742de837d6c5e975cd4a593aae369eeccade19
@@ -16,7 +16,7 @@ module Shiprails
16
16
  def check_git_status
17
17
  if git.status.added.any? or git.status.changed.any? or git.status.deleted.any?
18
18
  say "You have uncommitted changes. Commit and try again.", :red
19
- # exit # TESTING
19
+ exit
20
20
  end
21
21
  end
22
22
 
@@ -27,12 +27,12 @@ module Shiprails
27
27
  configuration[:services].each do |service_name, service|
28
28
  image_name = "#{compose_project_name}_#{service[:image]}"
29
29
  service[:regions].each do |region_name, region|
30
- aws_region = region_name.to_s
31
30
  region[:environments].each do |environment_name|
32
31
  next unless args.empty? or args.include?(environment_name)
33
- result = `S3_CONFIG_BUCKET=#{s3_config_bucket} bundle exec config list #{environment_name}`
34
- s3_config_revision = result.match(/#{environment_name} \(v([0-9]+)\)/)[1] rescue 0
35
- commands << "docker build -t #{image_name}_#{environment_name} --build-arg AWS_ACCESS_KEY_ID='#{aws_access_key_id}' --build-arg AWS_SECRET_ACCESS_KEY='#{aws_access_key_secret}' --build-arg AWS_REGION='#{aws_region}' --build-arg S3_CONFIG_BUCKET='#{s3_config_bucket}' --build-arg S3_CONFIG_ENVIRONMENT='#{environment_name}' --build-arg S3_CONFIG_REVISION='#{s3_config_revision}' -f Dockerfile.production ."
32
+ s3 = Aws::S3::Client.new(region: region_name.to_s)
33
+ objects = s3.list_objects_v2(bucket: s3_config_bucket, prefix: environment_name)
34
+ s3_config_revision = objects.contents.map{ |object| object.key[/\d+/].to_i }.max || 0
35
+ commands << "docker build -t #{image_name}_#{environment_name} --build-arg AWS_ACCESS_KEY_ID='#{aws_access_key_id}' --build-arg AWS_SECRET_ACCESS_KEY='#{aws_access_key_secret}' --build-arg AWS_REGION='#{region_name.to_s}' --build-arg S3_CONFIG_BUCKET='#{s3_config_bucket}' --build-arg S3_CONFIG_ENVIRONMENT='#{environment_name}' --build-arg S3_CONFIG_REVISION='#{s3_config_revision}' -f Dockerfile.production ."
36
36
  end
37
37
  end
38
38
  end
@@ -1,3 +1,3 @@
1
1
  module Shiprails
2
- VERSION = "0.1.9"
2
+ VERSION = "0.1.10"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shiprails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zane Shannon