Merge pull request #2883 from ntimo/task/updater-diff-to-sub-directory

[Updater] Save diff files into subdirectory
master
André Peters 2019-08-25 19:33:13 +02:00 committed by GitHub
commit e6f3261a29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

2
.gitignore vendored
View File

@ -33,7 +33,7 @@ data/conf/portainer/
data/gitea/
data/gogs/
data/conf/sogo/plist_ldap
diff_before_update_*
update_diffs/
.github/
docker-compose.override.yml
refresh_images.sh

View File

@ -328,8 +328,11 @@ if [[ ! "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
exit 0
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"
mkdir -p ${DIFF_DIRECTORY}
mv diff_before_update* ${DIFF_DIRECTORY}/ 2> /dev/null
git diff --stat > ${DIFF_FILE}
git diff >> ${DIFF_FILE}