[release] prevent overwriting ${CHANGELOG}.orig with truncated file
to avoid deleting most of CHANGELOG.md by accident when the release.sh
script gets interrupted halfway through, as happened during the v1.28.3
release in commit 7e8ca377fc
This commit is contained in:
@@ -6,5 +6,5 @@
|
||||
# it under the terms of the GNU General Public License version 2 as
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
__version__ = "1.28.4"
|
||||
__version__ = "1.28.5-dev"
|
||||
__variant__ = None
|
||||
|
||||
@@ -133,7 +133,7 @@ changelog() {
|
||||
-e "s*^## \w\+\$*## ${NEWVERSION} - $(date +%Y-%m-%d)*" \
|
||||
"${CHANGELOG}"
|
||||
|
||||
mv "${CHANGELOG}" "${CHANGELOG}.orig"
|
||||
mv --no-clobber -- "${CHANGELOG}" "${CHANGELOG}.orig"
|
||||
|
||||
# - remove all but the latest entries
|
||||
sed -n \
|
||||
@@ -157,7 +157,7 @@ upload-git() {
|
||||
cd "${ROOTDIR}"
|
||||
echo Pushing changes to github
|
||||
|
||||
mv "${CHANGELOG}.orig" "${CHANGELOG}" || true
|
||||
mv -- "${CHANGELOG}.orig" "${CHANGELOG}" || true
|
||||
git add "gallery_dl/version.py" "${README}" "${CHANGELOG}"
|
||||
git commit -S -m "release version ${NEWVERSION}"
|
||||
git tag -s -m "version ${NEWVERSION}" "v${NEWVERSION}"
|
||||
|
||||
Reference in New Issue
Block a user