mirror of
https://github.com/certbot/certbot.git
synced 2026-01-26 07:41:33 +03:00
Minor release script improvements (#7697)
* Do not use git diff. * Add a warning on exit.
This commit is contained in:
@@ -7,6 +7,24 @@ if [ "$RELEASE_DIR" = "" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ExitWarning() {
|
||||
exit_status="$?"
|
||||
if [ "$exit_status" != 0 ]; then
|
||||
# Don't print each command before executing it because it will disrupt
|
||||
# the desired output.
|
||||
set +x
|
||||
echo '******************************'
|
||||
echo '* *'
|
||||
echo '* THE RELEASE SCRIPT FAILED! *'
|
||||
echo '* *'
|
||||
echo '******************************'
|
||||
set -x
|
||||
fi
|
||||
exit "$exit_status"
|
||||
}
|
||||
|
||||
trap ExitWarning EXIT
|
||||
|
||||
version="$1"
|
||||
echo Releasing production version "$version"...
|
||||
nextversion="$2"
|
||||
@@ -67,7 +85,6 @@ git checkout "$RELEASE_BRANCH"
|
||||
# Update changelog
|
||||
sed -i "s/master/$(date +'%Y-%m-%d')/" certbot/CHANGELOG.md
|
||||
git add certbot/CHANGELOG.md
|
||||
git diff --cached
|
||||
git commit -m "Update changelog for $version release"
|
||||
|
||||
for pkg_dir in $SUBPKGS certbot-compatibility-test
|
||||
@@ -230,7 +247,6 @@ cp -p letsencrypt-auto-source/letsencrypt-auto certbot-auto
|
||||
cp -p letsencrypt-auto-source/letsencrypt-auto letsencrypt-auto
|
||||
|
||||
git add certbot-auto letsencrypt-auto letsencrypt-auto-source certbot/docs/cli-help.txt
|
||||
git diff --cached
|
||||
while ! git commit --gpg-sign="$RELEASE_GPG_KEY" -m "Release $version"; do
|
||||
echo "Unable to sign the release commit using git."
|
||||
echo "You may have to configure git to use gpg2 by running:"
|
||||
@@ -258,7 +274,6 @@ $body
|
||||
|
||||
$footer" > certbot/CHANGELOG.md
|
||||
git add certbot/CHANGELOG.md
|
||||
git diff --cached
|
||||
git commit -m "Add contents to certbot/CHANGELOG.md for next version"
|
||||
|
||||
echo "New root: $root"
|
||||
@@ -273,6 +288,5 @@ if [ "$RELEASE_BRANCH" = candidate-"$version" ] ; then
|
||||
SetVersion "$nextversion".dev0
|
||||
letsencrypt-auto-source/build.py
|
||||
git add letsencrypt-auto-source/letsencrypt-auto
|
||||
git diff
|
||||
git commit -m "Bump version to $nextversion"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user