File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,9 @@ set -o nounset
55set  -o pipefail
66
77#  use homebrew cut if installed
8- if  [[ -d  " /usr/local/opt/coreutils/libexec/gnubin" ;  then 
9-   PATH=" /usr/local/opt/coreutils/libexec/gnubin:${PATH} " 
8+ HOMEBREW_PREFIX=" $( brew --prefix) " 
9+ if  [[ -d  " ${HOMEBREW_PREFIX} /opt/coreutils/libexec/gnubin" ;  then 
10+   PATH=" ${HOMEBREW_PREFIX} /opt/coreutils/libexec/gnubin:${PATH} " 
1011fi 
1112
1213function  crd_to_json_schema()  {
@@ -41,7 +42,7 @@ function crd_to_json_schema() {
4142        echo  " apiextensions: ${api_version}  documentIndex: ${document}  | kind: ${kind}  crd_kind: ${crd_kind}  crd_group: ${crd_group} " 
4243        crd_version=$( yq eval  " select(documentIndex == ${document} ) | .spec.version" " ${input} " ) 
4344        if  [ -n  " ${crd_version} " ;  then 
44-           yq eval  --prettyPrint --tojson  " select(documentIndex == ${document} ) | .spec.validation.openAPIV3Schema" " ${input} " |  write_schema " ${crd_kind} -${crd_group} -${crd_version} .json" 
45+           yq eval  --prettyPrint -o json  " select(documentIndex == ${document} ) | .spec.validation.openAPIV3Schema" " ${input} " |  write_schema " ${crd_kind} -${crd_group} -${crd_version} .json" 
4546        else 
4647          for  crd_version  in  $( yq eval  " select(documentIndex == ${document} ) | .spec.versions[].name" " ${input} " ) ;  do 
4748            yq eval  --prettyPrint -o json " select(documentIndex == ${document} ) | .spec.validation.openAPIV3Schema" " ${input} " |  write_schema " ${crd_kind} -${crd_group} -${crd_version} .json" 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments