Fix linters error by using "ls | grep"
Fix error created in patch If190bcddad3b0d310a51dc302303e86c202a41fe . Now it uses "find". Also add check, that provided package is really existed. Previously it was cause of wrong packaging all packages in one, when package is not found. Change-Id: I82508e8841b920cdff38b0f7d673ec74e448701e
This commit is contained in:
parent
66214e4abe
commit
2ed5e21201
@ -131,6 +131,8 @@ if $build_packages ; then
|
|||||||
# zip necessary apps
|
# zip necessary apps
|
||||||
pushd "$source_dir"
|
pushd "$source_dir"
|
||||||
for d in ${packages[*]}; do
|
for d in ${packages[*]}; do
|
||||||
|
# check that package is realy existed
|
||||||
|
check_dir "$d"
|
||||||
# get FQN for creating package
|
# get FQN for creating package
|
||||||
package_name="$(grep FullName "$d/package/manifest.yaml" | awk '{print $2}')"
|
package_name="$(grep FullName "$d/package/manifest.yaml" | awk '{print $2}')"
|
||||||
filename="$destination_dir/$package_name.zip"
|
filename="$destination_dir/$package_name.zip"
|
||||||
@ -160,8 +162,7 @@ if $upload ; then
|
|||||||
# to have ability upload one package independently we need to remove it
|
# to have ability upload one package independently we need to remove it
|
||||||
# via client and then upload it without updating its dependencies
|
# via client and then upload it without updating its dependencies
|
||||||
for d in "${packages[@]}"; do
|
for d in "${packages[@]}"; do
|
||||||
package_name="$(ls "$destination_dir" | grep "$d")"
|
filename="$(find "$destination_dir" -maxdepth 1 -name "*$d*")"
|
||||||
filename="$destination_dir/$package_name"
|
|
||||||
pkg_id=$(murano package-list --owned | grep "$d" | awk '{print $2}')
|
pkg_id=$(murano package-list --owned | grep "$d" | awk '{print $2}')
|
||||||
murano package-delete "$pkg_id"
|
murano package-delete "$pkg_id"
|
||||||
murano package-import "$filename" --exists-action s
|
murano package-import "$filename" --exists-action s
|
||||||
|
Loading…
Reference in New Issue
Block a user