shiprails 0.1.10 → 0.1.11

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: 0ee7bd51be61d4b3ce92812299c11054c607cf63
4
- data.tar.gz: 8d6de7fd6e03680eac37ea9f14d4b35ebc036136
3
+ metadata.gz: dc955dce4f735e2c919fba589d6ef5d3f46b9bf8
4
+ data.tar.gz: bfd7b26c2ded4810b1486e8400e41f96cb95da9d
5
5
  SHA512:
6
- metadata.gz: 21c394cc17c4d0045a999b9d855b47c13e285a35a65c66c04bd4b2d80983968e29cd4e2932e84e7974b9b26d1afdd1201553e48e5d95716e5e087e9987121594
7
- data.tar.gz: a4674f76b93e39d12d7ccc222e2b431dbf1bd39e3bfedd9e3ddd57015a8ab4719cae455477b995c63334378d11742de837d6c5e975cd4a593aae369eeccade19
6
+ metadata.gz: f2f29c9b0be7fdadbba5c4e00149e203e7bb2ac470eda4a38d9d74c88203ccef78d9ed01cf2dd0a53591a333bcfa2f54f1a4c2c2d41517b77c8ca1db637413af
7
+ data.tar.gz: 96bb663b45334b95bbc6b23ea77a26eb351e29ba53c738242905b1f1842775f71caf087e71ff3d3ec74bf76c5e54782e3aa1fca3cf472023e9895539823c85ce
@@ -1,5 +1,6 @@
1
1
  require "active_support/all"
2
2
  require "aws-sdk"
3
+ require "base64"
3
4
  require "git"
4
5
  require "thor/group"
5
6
 
@@ -68,7 +69,10 @@ module Shiprails
68
69
  end
69
70
  end
70
71
  repository_urls_to_regions.each do |repository_url, region|
71
- run "`aws ecr get-login --region #{region}`"
72
+ ecr = Aws::ECR::Client.new({ region: region.to_s })
73
+ authorization_data = ecr.get_authorization_token.authorization_data.first
74
+ credentials = Base64.decode64(authorization_data.authorization_token).split(':')
75
+ run "docker login -u #{credentials.first} -p #{credentials.last} -e none #{authorization_data.proxy_endpoint}"
72
76
  run "docker push #{repository_url}:#{git_sha}" # TODO: check that this succeeded
73
77
  end
74
78
  say "Push complete.", :green
@@ -1,3 +1,3 @@
1
1
  module Shiprails
2
- VERSION = "0.1.10"
2
+ VERSION = "0.1.11"
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.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zane Shannon