Skip to content

Commit 0e2c46c

Browse files
committed
[REVIEW] Revert "balena-deploy: Preserve blocks containers in deploy directory"
This reverts commit 7ba497ee22e3273d1c6f7f35cf6c04771b1a60d9.
1 parent 8638e76 commit 0e2c46c

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

automation/include/balena-deploy.inc

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ balena_deploy_artifacts () {
3434
local _device_state
3535
local _yocto_build_deploy
3636
local _slug
37-
local _blocks
38-
local _block_file
39-
local _block_files
4037

4138

4239
[ ! -f "${_device_type_json}" ] && echo "[balena_deploy_artifacts] Device type JSON not found" && return
@@ -50,20 +47,8 @@ balena_deploy_artifacts () {
5047
_yocto_build_deploy="${device_dir}/build/tmp/deploy/images/${_device_type}"
5148
_slug=$(jq --raw-output '.slug' "${_device_type_json}")
5249

53-
if [ -z "${_preserve_build}" ]; then
54-
if [ -n "${blocks}" ]; then
55-
_tmp_dir=$(mktemp -d)
56-
for _block in ${blocks}; do
57-
find "${_deploy_dir}" -name "${_device_type}-${_block}-*.docker" -exec mv -v {} "${_tmp_dir}" \;
58-
done
59-
fi
60-
rm -rf "${_deploy_dir}"
61-
fi
50+
[ -z "${_preserve_build}" ] && rm -rf "${_deploy_dir}"
6251
mkdir -p "${_deploy_dir}/image"
63-
if [ -d "${_tmp_dir}" ]; then
64-
mv "${_tmp_dir}"/* "${_deploy_dir}"
65-
rm -rf "${_tmp_dir}"
66-
fi
6752

6853
cp -v "$_device_type_json" "$_deploy_dir/device-type.json"
6954
if [ "${_device_state}" = "DISCONTINUED" ]; then

0 commit comments

Comments
 (0)