Do not delete hidden files on deployment

This commit is contained in:
Florine W. Dekker 2021-04-18 21:20:26 +02:00
parent ddaf9c80e5
commit b977e81283
Signed by: FWDekker
GPG Key ID: B1B567AF58D6EE0F
2 changed files with 4 additions and 6 deletions

View File

@ -38,13 +38,12 @@ npm run deploy
if [ $delete_target -eq 1 ]; then
echo "[[ Deploy ]] Deleting then recreating '$dst_dir'."
rm -rf "$dst_dir"
mkdir "$dst_dir"
rm -rf "${dst_dir:?}/**"
chmod g+w "$dst_dir"
fi
echo "[[ Deploy ]] Copying files from '$tmp_dir/dist' to '$dst_dir'."
chmod -R g+w "dist/"
chmod -R g+w "dist"
cp -r dist/ "$dst_dir"
echo "[[ Deploy ]] Deleting '$tmp_dir'."

View File

@ -34,13 +34,12 @@ rm -rf "$tmp_dir/.git/"
if [ $delete_target -eq 1 ]; then
echo "[[ Deploy ]] Deleting then recreating '$dst_dir'."
rm -rf "$dst_dir"
mkdir "$dst_dir"
rm -rf "${dst_dir:?}/**"
chmod g+w "$dst_dir"
fi
echo "[[ Deploy ]] Copying files from '$tmp_dir' to '$dst_dir'."
chmod -R g+w "$tmp_dir/"
chmod -R g+w "$tmp_dir"
cp -r "$tmp_dir/" "$dst_dir"
echo "[[ Deploy ]] Deleting '$tmp_dir'."