Merge pull request #2883 from ntimo/task/updater-diff-to-sub-directory
[Updater] Save diff files into subdirectorymaster
commit
e6f3261a29
|
@ -33,7 +33,7 @@ data/conf/portainer/
|
||||||
data/gitea/
|
data/gitea/
|
||||||
data/gogs/
|
data/gogs/
|
||||||
data/conf/sogo/plist_ldap
|
data/conf/sogo/plist_ldap
|
||||||
diff_before_update_*
|
update_diffs/
|
||||||
.github/
|
.github/
|
||||||
docker-compose.override.yml
|
docker-compose.override.yml
|
||||||
refresh_images.sh
|
refresh_images.sh
|
||||||
|
|
|
@ -328,8 +328,11 @@ if [[ ! "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DIFF_FILE=diff_before_update_$(date +"%Y-%m-%d-%H-%M-%S")
|
DIFF_DIRECTORY=update_diffs
|
||||||
|
DIFF_FILE=${DIFF_DIRECTORY}/diff_before_update_$(date +"%Y-%m-%d-%H-%M-%S")
|
||||||
echo -e "\e[32mSaving diff to ${DIFF_FILE}...\e[0m"
|
echo -e "\e[32mSaving diff to ${DIFF_FILE}...\e[0m"
|
||||||
|
mkdir -p ${DIFF_DIRECTORY}
|
||||||
|
mv diff_before_update* ${DIFF_DIRECTORY}/ 2> /dev/null
|
||||||
git diff --stat > ${DIFF_FILE}
|
git diff --stat > ${DIFF_FILE}
|
||||||
git diff >> ${DIFF_FILE}
|
git diff >> ${DIFF_FILE}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue