diff --git a/.circleci/config.yml b/.circleci/config.yml index 39f77aeab1c..daae8ed2d5b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -110,12 +110,20 @@ jobs: rm -rf ${IMAGE_PATH}/*cferom* # Generate md5 and store images into workspace - for f in ${IMAGE_PATH}/*.{squashfs.pkgtb,w}; do - md5sum "$f" > "$f.md5" - cp "$f" workspace/release || : - done + files=("${IMAGE_PATH}"/*.squashfs.pkgtb "${IMAGE_PATH}"/*.w) - cp ${IMAGE_PATH}/*.md5 workspace/release || : + if [ ${#files[@]} -gt 0 ]; then + for f in "${files[@]}"; do + if [ -f "$f" ] && [ "${f##*.}" != "md5" ]; then + echo "Creating MD5 signature for $f" + md5sum "$f" > "workspace/release/$f.md5" + echo "Copying image $f to workspace" + cp "$f" workspace/release + fi + done + else + echo "No *.squashfs.pkgtb or *.w files found in ${IMAGE_PATH}" + fi if [[ ${UI} == "none" ]]; then cp /tmp/build.log workspace/release/${MODEL}-build.log