Browse Source

Merge "Fix linters error by using "ls | grep""

changes/85/359185/1
Jenkins 2 years ago
parent
commit
9dbbee8fe1
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      tools/prepare_packages.sh

+ 3
- 2
tools/prepare_packages.sh View File

@@ -131,6 +131,8 @@ if $build_packages ; then
131 131
     # zip necessary apps
132 132
     pushd "$source_dir"
133 133
         for d in ${packages[*]}; do
134
+            # check that package is realy existed
135
+            check_dir "$d"
134 136
             # get FQN for creating package
135 137
             package_name="$(grep FullName "$d/package/manifest.yaml" | awk '{print $2}')"
136 138
             filename="$destination_dir/$package_name.zip"
@@ -160,8 +162,7 @@ if $upload ; then
160 162
     # to have ability upload one package independently we need to remove it
161 163
     # via client and then upload it without updating its dependencies
162 164
     for d in "${packages[@]}"; do
163
-        package_name="$(ls "$destination_dir" | grep "$d")"
164
-        filename="$destination_dir/$package_name"
165
+        filename="$(find "$destination_dir" -maxdepth 1 -name "*$d*")"
165 166
         pkg_id=$(murano package-list --owned | grep "$d" | awk '{print $2}')
166 167
         murano package-delete "$pkg_id"
167 168
         murano package-import "$filename" --exists-action s

Loading…
Cancel
Save