This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch release/2.21.0 in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit ca8c91d55fd52b8d26f7a3255eb1a5a9a0e27a1d Author: Volkan Yazıcı <[email protected]> AuthorDate: Wed Oct 4 11:00:21 2023 +0200 Add `generate-email.sh` --- .github/generate-email.sh | 106 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/.github/generate-email.sh b/.github/generate-email.sh new file mode 100755 index 0000000000..0cb4d90ff1 --- /dev/null +++ b/.github/generate-email.sh @@ -0,0 +1,106 @@ +#!/bin/bash +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd) + +stderr() { + echo "$*" 1>&2 +} + +fail_for_invalid_args() { + stderr "Invalid arguments!" + stderr "Expected arguments: <vote|announce> <version> <commitId>" + exit 1 +} + +# Check arguments +[ $# -ne 3 ] && fail_for_invalid_args + +# Constants +PROJECT_NAME="Apache Log4j" +PROJECT_SITE="https://logging.apache.org/log4j" +PROJECT_STAGING_SITE="${PROJECT_SITE/apache.org/staged.apache.org}" +PROJECT_REPO="https://github.com/apache/logging-log4j2" +PROJECT_DIST_DIR="https://dist.apache.org/repos/dist/dev/logging/log4j" +PROJECT_VERSION="$2" +COMMIT_ID="$3" + +# Check release notes file +RELEASE_NOTES_FILE="$SCRIPT_DIR/../target/generated-sources/site/asciidoc/release-notes/$PROJECT_VERSION.adoc" +[ -f "$RELEASE_NOTES_FILE" ] || { + stderr "Couldn't find release notes file: $RELEASE_NOTES_FILE" + exit 1 +} + +dump_release_notes() { + awk "f{print} /^Release date::/{f=1}" "$RELEASE_NOTES_FILE" +} + +case $1 in + +vote) + cat <<EOF +To: [email protected] +Title: [VOTE] Release $PROJECT_NAME $PROJECT_VERSION + +This is a vote to release the $PROJECT_NAME $PROJECT_VERSION. + +Website: $PROJECT_STAGING_SITE +GitHub: $PROJECT_REPO +Commit: $COMMIT_ID +Distribution: $PROJECT_DIST_DIR +Nexus: https://repository.apache.org/content/repositories/orgapachelogging-1113 +Signing key: 0x077e8893a6dcc33dd4a4d5b256e73ba9a0b592d0 + +Please download, test, and cast your votes on this mailing list. + +[ ] +1, release the artifacts +[ ] -1, don't release, because... + +This vote is open for 72 hours and will pass unless getting a +net negative vote count. All votes are welcome and we encourage +everyone to test the release, but only the Logging Services PMC +votes are officially counted. + +=== Release Notes +EOF + dump_release_notes + ;; + +announce) + cat <<EOF +To: [email protected], [email protected] +Title: [ANNOUNCE] $PROJECT_NAME $PROJECT_VERSION released + +${PROJECT_NAME} team is pleased to announce the $PROJECT_VERSION +release. ${PROJECT_NAME} is a versatile, industrial-strength +Java logging framework composed of an API, its implementation, +and components to assist the deployment for various use cases. +For further information (support, download, etc.) see the project +website[1]. + +[1] $PROJECT_SITE + +=== Release Notes +EOF + dump_release_notes + ;; + +*) fail_for_invalid_args + +esac
