mina-circle 1.2.1 → 1.2.2

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: 503a457c2bdbf41a6f472d8b87eda0dd6aaaafdd
4
- data.tar.gz: d6732ba8e4d67a0adc40878c20c9b2c6e149cefb
3
+ metadata.gz: 81468167f380d30f567dfbee43a809965f9df4ab
4
+ data.tar.gz: c9ffa18957e5af1a040a5a805c8f1b1b5348682f
5
5
  SHA512:
6
- metadata.gz: 56e9a58a359bcfbb3523aa521311e01b96a6f0fcfcd180981772915a70457a3cff5f820c38543703586621b1b3002faad7434eb5d0be19e021c935ca615edb5e
7
- data.tar.gz: 6bba22659ea01643628f3de8bb6a3d88bca948bbacc59bb7b53f2e779615a1d8223da48011a83762d3ab913d0de530f3b3ea9d6933a0695e711fd41cdc936e16
6
+ metadata.gz: d9bf57d33748fd7a71d43b5d17796ba30db72b962d4df5ab1c97263d42ff7836f9c984161e23b6ffcc8a67b0920c50a9e927e50e2264824a2dd637b948cf54b5
7
+ data.tar.gz: 9b2572355f87c327925636b2ab98be4385b0aab92382e3adacf65e7076a5a38cd2f1b60079e177eaebaaf6688a5ffc526fad912e0a18500deeeee2f5da62ce0f
@@ -16,6 +16,8 @@ class CircleCI
16
16
  def artifacts(build)
17
17
  puts "Build: #{build.build_num}"
18
18
  get("#{build.build_num}/artifacts").collect { |artifact_hash| Artifact.new(artifact_hash) }
19
+ rescue
20
+ puts "No artifact found for build #{build.build_num} on #{@branch}"
19
21
  end
20
22
 
21
23
  def get(path)
@@ -2,9 +2,15 @@ module MinaCircle
2
2
  module Helpers
3
3
  def build_url
4
4
  latest_build = circle_ci.builds.first
5
- circle_ci.artifacts(latest_build).select { |artifact|
5
+ artifacts = circle_ci.artifacts(latest_build).select { |artifact|
6
6
  artifact.filename == circle_artifact
7
- }.first.url
7
+ }
8
+ raise "No artifacts found for build: #{latest_build.build_num} on #{branch}. #{latest_build.status}" if artifacts.empty?
9
+ artifacts.first.url
10
+ rescue Exception => e
11
+ puts e.message
12
+ puts ""
13
+ puts "Review your build at to ensure artifacts are being captured as described in https://circleci.com/docs/build-artifacts/"
8
14
  end
9
15
 
10
16
  def circle_ci
@@ -1,3 +1,3 @@
1
1
  module MinaCircle
2
- VERSION = '1.2.1'
2
+ VERSION = '1.2.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mina-circle
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Simpson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-07-20 00:00:00.000000000 Z
12
+ date: 2016-10-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mina
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  version: '0'
145
145
  requirements: []
146
146
  rubyforge_project:
147
- rubygems_version: 2.6.4
147
+ rubygems_version: 2.5.1
148
148
  signing_key:
149
149
  specification_version: 4
150
150
  summary: Deploy your application from artifacts produced by CircleCI