This is an automated email from the ASF dual-hosted git repository.

vy pushed a commit to branch release/0.5.0
in repository https://gitbox.apache.org/repos/asf/logging-log4j-tools.git


The following commit(s) were added to refs/heads/release/0.5.0 by this push:
     new 8e98ffe  Harden email script
8e98ffe is described below

commit 8e98ffed699beb352be457221a35987ba1654b06
Author: Volkan Yazıcı <[email protected]>
AuthorDate: Tue Jul 25 10:41:55 2023 +0200

    Harden email script
---
 .github/generate-email.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/.github/generate-email.sh b/.github/generate-email.sh
index 14a372d..97fbc42 100755
--- a/.github/generate-email.sh
+++ b/.github/generate-email.sh
@@ -16,6 +16,8 @@
 # limitations under the License.
 #
 
+SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
+
 stderr() {
     echo "$*" 1>&2
 }
@@ -36,14 +38,14 @@ PROJECT_VERSION="$2"
 COMMIT_ID="$3"
 
 # Check release notes file
-RELEASE_NOTES_FILE="target/release-notes/$PROJECT_VERSION.md"
+RELEASE_NOTES_FILE="$SCRIPT_DIR/../target/release-notes/$PROJECT_VERSION.md"
 [ -f "$RELEASE_NOTES_FILE" ] || {
     stderr "Couldn't find release notes file: $RELEASE_NOTES_FILE"
     exit 1
 }
 
 dump_release_notes() {
-    awk "f{print} /^# $PROJECT_VERSION/{f=1}" 
target/release-notes/$PROJECT_VERSION.md
+    awk "f{print} /^# $PROJECT_VERSION/{f=1}" "$RELEASE_NOTES_FILE"
 }
 
 case $1 in

Reply via email to