27 lines
679 B
Bash
Executable File
27 lines
679 B
Bash
Executable File
#!/usr/bin/env bash
|
|
## make_patch Creates patch file with updates of built-in Spacemacs files.
|
|
##
|
|
## Copyright (c) 2014-2021 Sylvain Benner & Contributors
|
|
##
|
|
## Author: Eugene Yaremenko
|
|
## URL: https://github.com/syl20bnr/spacemacs
|
|
##
|
|
## This file is not part of GNU Emacs.
|
|
##
|
|
## License: GPLv3
|
|
|
|
git add --all
|
|
git commit -m "Built-in files auto-update: $(date -u)"
|
|
if [ $? -ne 0 ]; then
|
|
echo "Built-in files don't need an update."
|
|
exit 0
|
|
else
|
|
git format-patch -1 HEAD --stdout > "/tmp/${PUBLISH}.patch"
|
|
if [ $? -ne 0 ]; then
|
|
echo "Failed to create built-in patch file."
|
|
exit 2
|
|
fi
|
|
git reset --hard HEAD~1
|
|
cat "/tmp/${PUBLISH}.patch"
|
|
fi
|