xcpretty-buildkite-formatter 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6b6ee16e9c58df30b1c7a573e9a3a46f353faa96
4
- data.tar.gz: 7bb5293a33b4ed1df634e75efaffc66bfd55c358
3
+ metadata.gz: c59ecd6dad52627c3ad65d34c7cd8e96b4f1cf17
4
+ data.tar.gz: 8e6d79ac9bce1b53bd71fb1160ffacbbcce6fd75
5
5
  SHA512:
6
- metadata.gz: 958c2a194cbd4e401e618461021b01a7a818d04b489c4be1d984991086bb36e0cbf0c58d0d5719ea0120cce12c4e1214f54c0b8d25816241bf72e44d97c3c2f6
7
- data.tar.gz: c8555460eb5998138ab58cad5ed9042ab0533e003f5a96ab7a88e903a927bca05b9c7968b5afeb905bb230472122c19d12d042f46531041d8a8c28c94381eeb3
6
+ metadata.gz: d3a45824b106aa62c4aa9b2331dd9e8709f4d215926ba3ff5111f5e2a177bd19b271529643fd778369d22b56aad2fafaee9997bd32282d4656446bfda5e55f87
7
+ data.tar.gz: ea117e0c7629d7e4290c77fa9156971f405be02f7654824d62be24aaeffb92631985af8500c903abd8b72f23910f2603a71fbdcb433c39d0ec802c83d4382de9
@@ -0,0 +1,7 @@
1
+ # 0.0.2
2
+
3
+ - Add yellow output indicating files we would have inlined
4
+
5
+ # 0.0.1
6
+
7
+ - Initial commit
@@ -6,16 +6,18 @@ class BuildkiteFormatter < XCPretty::Simple
6
6
 
7
7
  def pretty_format(text)
8
8
  if KSDIFF_MATCHER.match(text)
9
- upload_artifacts($1, $2)
10
- inline_artifacts($1, $2)
9
+ if buildkite?
10
+ upload_artifacts($1, $2)
11
+ inline_artifacts($1, $2)
12
+ else
13
+ STDOUT.puts("\e[33mNot on Buildkite, would have uploaded: \n #{$1}\n #{$2}\e[0m")
14
+ end
11
15
  end
12
16
 
13
17
  parser.parse(text)
14
18
  end
15
19
 
16
20
  def inline_artifacts(*artifacts)
17
- return unless buildkite?
18
-
19
21
  artifacts.each do |artifact|
20
22
  image_contents = Base64.encode64(File.read(artifact)).gsub("\n", '')
21
23
  image_name = Base64.encode64(File.basename(artifact)).gsub("\n", '')
@@ -25,8 +27,6 @@ class BuildkiteFormatter < XCPretty::Simple
25
27
  end
26
28
 
27
29
  def upload_artifacts(*artifacts)
28
- return unless buildkite?
29
-
30
30
  artifacts.each do |artifact|
31
31
  Kernel.system('buildkite-agent', 'artifact', 'upload', artifact)
32
32
  end
@@ -1,5 +1,5 @@
1
1
  require 'xcpretty'
2
2
 
3
3
  class BuildkiteFormatter < XCPretty::Simple
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcpretty-buildkite-formatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blake Mesdag
@@ -89,6 +89,7 @@ extensions: []
89
89
  extra_rdoc_files: []
90
90
  files:
91
91
  - ".gitignore"
92
+ - CHANGELOG.md
92
93
  - Gemfile
93
94
  - LICENSE.txt
94
95
  - README.md