File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,13 @@ const specifyOutputForArray = (type, enitities) => {
65
65
_ . forEach ( enitities , ( entity ) => {
66
66
jsonArray . push ( entity . info ) ;
67
67
} ) ;
68
- logUpdate ( JSON . stringify ( jsonArray , null , '\t' ) ) ;
68
+
69
+ if ( jsonArray . length === 1 ) {
70
+ logUpdate ( JSON . stringify ( jsonArray [ 0 ] , null , '\t' ) ) ;
71
+ } else {
72
+ logUpdate ( JSON . stringify ( jsonArray , null , '\t' ) ) ;
73
+ }
74
+
69
75
break ;
70
76
case 'yaml' :
71
77
let yamlArray = {
@@ -74,7 +80,12 @@ const specifyOutputForArray = (type, enitities) => {
74
80
_ . forEach ( enitities , ( entity ) => {
75
81
yamlArray . items . push ( entity . info ) ;
76
82
} ) ;
77
- logUpdate ( yaml . safeDump ( yamlArray ) ) ;
83
+
84
+ if ( yamlArray . items . length === 1 ) {
85
+ logUpdate ( yaml . safeDump ( yamlArray . items [ 0 ] ) ) ;
86
+ } else {
87
+ logUpdate ( yaml . safeDump ( yamlArray ) ) ;
88
+ }
78
89
break ;
79
90
case 'name' :
80
91
_ . forEach ( enitities , ( entity ) => {
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ const _extractFieldsForImageEntity = (image, tag) => {
12
12
name : image . imageDisplayName ,
13
13
size : filesize ( image . size ) ,
14
14
_id : image . _id ,
15
+ annotations : _ . get ( image , 'metadata' , { } ) ,
15
16
} ;
16
17
newImage . image_id = image . internalImageId ? image . internalImageId . substring ( 0 , 12 ) : '\b' ;
17
18
if ( _ . isEqual ( tag , '<none>' ) ) {
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " codefresh" ,
3
- "version" : " 0.6.7 " ,
3
+ "version" : " 0.6.8 " ,
4
4
"description" : " Codefresh command line utility" ,
5
5
"main" : " index.js" ,
6
6
"preferGlobal" : true ,
You can’t perform that action at this time.
0 commit comments