mirror of https://github.com/openXC7/prjxray.git
Merge pull request #624 from mithro/kmaster
infra: Improve the diff output.
This commit is contained in:
commit
2830c4ab88
|
|
@ -80,30 +80,53 @@ echo " Database Differences"
|
||||||
echo "----------------------------------------"
|
echo "----------------------------------------"
|
||||||
(
|
(
|
||||||
cd database
|
cd database
|
||||||
|
# Update the index with any new files
|
||||||
|
git add \
|
||||||
|
--verbose \
|
||||||
|
--all \
|
||||||
|
--ignore-errors \
|
||||||
|
.
|
||||||
|
|
||||||
|
# Output what git status
|
||||||
|
echo
|
||||||
echo "----------------------------------------"
|
echo "----------------------------------------"
|
||||||
echo " Database Status"
|
echo " Database Status"
|
||||||
echo "----------------------------------------"
|
echo "----------------------------------------"
|
||||||
git status
|
git status
|
||||||
git add *
|
|
||||||
echo "----------------------------------------"
|
echo "----------------------------------------"
|
||||||
|
|
||||||
|
|
||||||
|
# Output a summary of how the files have changed
|
||||||
echo
|
echo
|
||||||
echo "----------------------------------------"
|
echo "----------------------------------------"
|
||||||
echo " Database Diff Summary"
|
echo " Database Diff Summary"
|
||||||
echo "----------------------------------------"
|
echo "----------------------------------------"
|
||||||
git diff --stat --irreversible-delete --find-renames --find-copies --ignore-all-space
|
git diff --stat --irreversible-delete --find-renames --find-copies --ignore-all-space
|
||||||
|
|
||||||
|
# Output the actually diff
|
||||||
echo
|
echo
|
||||||
echo "----------------------------------------"
|
echo "----------------------------------------"
|
||||||
echo " Database Diff"
|
echo " Database Diff"
|
||||||
echo "----------------------------------------"
|
echo "----------------------------------------"
|
||||||
git diff --color --irreversible-delete --find-renames --find-copies --ignore-all-space
|
git diff --color --irreversible-delete --find-renames --find-copies --ignore-all-space
|
||||||
|
|
||||||
|
# Save the diff to be uploaded as an artifact
|
||||||
echo
|
echo
|
||||||
echo "----------------------------------------"
|
echo "----------------------------------------"
|
||||||
echo " Generating pretty diff"
|
echo " Saving diff output"
|
||||||
echo "----------------------------------------"
|
echo "----------------------------------------"
|
||||||
|
# Patch file
|
||||||
|
git diff \
|
||||||
|
--color --irreversible-delete --find-renames --find-copies --ignore-all-space \
|
||||||
|
> diff.patch
|
||||||
|
|
||||||
|
# Pretty HTML file version
|
||||||
diff2html --summary=open --file diff.html --format html \
|
diff2html --summary=open --file diff.html --format html \
|
||||||
-- \
|
-- \
|
||||||
--irreversible-delete --find-renames --find-copies --ignore-all-space \
|
--irreversible-delete --find-renames --find-copies --ignore-all-space \
|
||||||
|| true
|
|| true
|
||||||
|
|
||||||
|
# Programmatic JSON version
|
||||||
diff2html --file diff.json --format json \
|
diff2html --file diff.json --format json \
|
||||||
-- \
|
-- \
|
||||||
--irreversible-delete --find-renames --find-copies --ignore-all-space \
|
--irreversible-delete --find-renames --find-copies --ignore-all-space \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue