jara 1.1.0-java → 1.1.1-java

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: 2866e6ec4f73dcf0b729a06c4c7cff6bd50dfaf8
4
- data.tar.gz: 0b6922ae025849ac6d3ccbfc84cdaecb7062c3b6
3
+ metadata.gz: 4876a8d24b653c3efd13a52640da720e83c5789f
4
+ data.tar.gz: 270d33ba165e30a68da52e0ab67dff7b6bd6db70
5
5
  SHA512:
6
- metadata.gz: 2831f0770b4f049855f2bf497bf74f271a4edb09ac19e593e80ab44332c01ac401ff2d7373a182d16d09d2b8686f4fbf0590cc39ee90408db2ed4f6803c1bb91
7
- data.tar.gz: 550f1254bc23d82c133a0621c745f927356976ae754ec5b30b64ce5deb78e3e8061d434bb771cbd43b43b103a987828c9a6bb2826ee92533ef7374e08f1d9a3e
6
+ metadata.gz: 601092fc0c707da7015d3d77f2aa294baa03de41930dde5bf892a61da5bbacafb6fac0344fae8787c1f843888030e489cad5ce106616c61f09fe9e9b00676b85
7
+ data.tar.gz: ca03450c5649909c9c3286268a9693ae58da8011a3384b2483c4b34d03f5c642c9c0f861b50907362183a7d49e69087df5ec8fa2deb68685da04ca51ada6a0c1
data/lib/jara/releaser.rb CHANGED
@@ -59,7 +59,9 @@ module Jara
59
59
  raise JaraError, 'No environment set' unless @environment
60
60
  raise JaraError, 'No bucket name set' unless @bucket_name
61
61
  if !@re_release && (obj = find_remote_artifact)
62
- @logger.warn('An artifact for %s already exists: s3://%s/%s' % [branch_sha[0, 8], @bucket_name, obj.key])
62
+ s3_uri = 's3://%s/%s' % [@bucket_name, obj.key]
63
+ @logger.warn('An artifact for %s already exists: %s' % [branch_sha[0, 8], s3_uri])
64
+ s3_uri
63
65
  else
64
66
  local_path = find_local_artifact || build_artifact
65
67
  upload_artifact(local_path)
@@ -134,21 +136,21 @@ module Jara
134
136
  end
135
137
 
136
138
  def upload_artifact(local_path)
137
- begin
138
- remote_path = [@environment, app_name, File.basename(local_path)].join('/')
139
- content_md5 = Digest::MD5.file(local_path).base64digest
140
- File.open(local_path, 'rb') do |io|
141
- s3.put_object(
142
- bucket: @bucket_name,
143
- key: remote_path,
144
- content_type: JAR_CONTENT_TYPE,
145
- content_md5: content_md5,
146
- metadata: metadata,
147
- body: io,
148
- )
149
- end
150
- @logger.info('Artifact uploaded to s3://%s/%s' % [@bucket_name, remote_path])
139
+ remote_path = [@environment, app_name, File.basename(local_path)].join('/')
140
+ content_md5 = Digest::MD5.file(local_path).base64digest
141
+ File.open(local_path, 'rb') do |io|
142
+ s3.put_object(
143
+ bucket: @bucket_name,
144
+ key: remote_path,
145
+ content_type: JAR_CONTENT_TYPE,
146
+ content_md5: content_md5,
147
+ metadata: metadata,
148
+ body: io,
149
+ )
151
150
  end
151
+ s3_uri = 's3://%s/%s' % [@bucket_name, remote_path]
152
+ @logger.info('Artifact uploaded to %s' % s3_uri)
153
+ s3_uri
152
154
  end
153
155
 
154
156
  def find_remote_artifact
data/lib/jara/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Jara
4
- VERSION = '1.1.0'.freeze
4
+ VERSION = '1.1.1'.freeze
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jara
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: java
6
6
  authors:
7
7
  - Burt Platform Team