buildkite-builder 3.5.0 → 3.6.0
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/VERSION +1 -1
- data/lib/buildkite/pipelines/command.rb +17 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93d05d1f845781bebfd8b0ad224f1b50ca3d48237817a7ae4391add514dc6103
|
4
|
+
data.tar.gz: 2c33310049a5c2c47e00813bbc02304c9dd8fe2b8842e013ea03ace5e5e607d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03675ba911feade1199a7ca2b86a7656107160e6b2994f0994a5cc8cc9b1e24e28c6e132f05e335827da1f4c191a7a07854707ba15015348734b67fa078eb2b7
|
7
|
+
data.tar.gz: ad283bfdeb754f8fb04373d39a9b383e3d66fcfefc51ed41627958b144993d9b21ceec3e8f41af607163334895c3e2f0da0ce02f92b5ab31f6be04ce47240d29
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 3.6.0
|
2
|
+
* `Buildkite::Pipelines::Command#run` now uses `Open3.capture3` to run system commands, and accepts an optional arg `capture`. When `capture` is true, it returns the stdout of the command. `capture` is true for the meta_data subcommands `get` and `keys` and for the artifact subcommands `shasum` and `search`.
|
3
|
+
|
1
4
|
## 3.5.0
|
2
5
|
* `plugin` registrations now takes an optional default attributes hash as the third argument.
|
3
6
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.6.0
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'open3'
|
4
|
+
|
3
5
|
module Buildkite
|
4
6
|
module Pipelines
|
5
7
|
class Command
|
@@ -17,7 +19,12 @@ module Buildkite
|
|
17
19
|
end
|
18
20
|
|
19
21
|
def artifact(subcommand, *args)
|
20
|
-
|
22
|
+
capture = case subcommand.to_s
|
23
|
+
when 'shasum', 'search' then true
|
24
|
+
else false
|
25
|
+
end
|
26
|
+
|
27
|
+
new(:artifact, subcommand, *args).run(capture: capture)
|
21
28
|
end
|
22
29
|
|
23
30
|
def annotate(body, *args)
|
@@ -25,7 +32,12 @@ module Buildkite
|
|
25
32
|
end
|
26
33
|
|
27
34
|
def meta_data(subcommand, *args)
|
28
|
-
|
35
|
+
capture = case subcommand.to_s
|
36
|
+
when 'get', 'keys' then true
|
37
|
+
else false
|
38
|
+
end
|
39
|
+
|
40
|
+
new(:'meta-data', subcommand, *args).run(capture: capture)
|
29
41
|
end
|
30
42
|
end
|
31
43
|
|
@@ -42,8 +54,9 @@ module Buildkite
|
|
42
54
|
@args = transform_args(args)
|
43
55
|
end
|
44
56
|
|
45
|
-
def run
|
46
|
-
|
57
|
+
def run(capture: false)
|
58
|
+
stdout, _, status = Open3.capture3(*to_a)
|
59
|
+
capture ? stdout : status.success?
|
47
60
|
end
|
48
61
|
|
49
62
|
private
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: buildkite-builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ngan Pham
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-11-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rainbow
|