sonic-screwdriver 2.2.1 → 2.2.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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/sonic/execute.rb +16 -2
- data/lib/sonic/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58baac92cd0720ee6f66d62b668d53eaf77a9b0bb184241dbbb69bdb2b7b120b
|
4
|
+
data.tar.gz: 593b326eee1fffa6da70b87f133a4cc1a61ae41b465962b5fa9077f1998c4dc5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01b85739677b31d02caeb2c34a585fc2f711972ff086574b138f68b38ba156e9325dd0f8ba6fb76bd698f5b7bf422b4a1a11336f27b4695d2f2de153688dcc3b
|
7
|
+
data.tar.gz: d42107ab7218aab71cf6b500dc377e34a587b27155e696f729633a870b2788ab0807fc16c680c49083c99597ab466631b5e8f92b7d343a388379f5e2ce918c3c
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,9 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *loosely* adheres to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [2.2.2] - 2021-04-12
|
7
|
+
- [#11](https://github.com/boltops-tools/sonic/pull/11) cli check
|
8
|
+
|
6
9
|
## [2.2.1] - 2021-04-12
|
7
10
|
- [#9](https://github.com/boltops-tools/sonic/pull/9) improve command array handling
|
8
11
|
|
data/lib/sonic/execute.rb
CHANGED
@@ -58,13 +58,27 @@ module Sonic
|
|
58
58
|
|
59
59
|
if status == "Success"
|
60
60
|
puts "Command successful: #{status}".color(:green)
|
61
|
-
|
61
|
+
exit_status(0)
|
62
62
|
else
|
63
63
|
puts "Command unsuccessful: #{status}".color(:red)
|
64
|
-
|
64
|
+
exit_status(1)
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
+
def exit_status(code)
|
69
|
+
exit(code) unless cli?
|
70
|
+
|
71
|
+
if code == 0
|
72
|
+
true
|
73
|
+
else
|
74
|
+
raise "Error running command"
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
def cli?
|
79
|
+
$0.include?('sonic')
|
80
|
+
end
|
81
|
+
|
68
82
|
def wait(command_id)
|
69
83
|
ongoing_states = ["Pending", "InProgress", "Delayed"]
|
70
84
|
|
data/lib/sonic/version.rb
CHANGED