This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/main by this push:
new 6649c55 Release note script: Check if the GITHUB_TOKEN var has been
set before running the command
6649c55 is described below
commit 6649c550e9c6c57c8c1c45132ea9c0bb6ad43a18
Author: Andrea Cosentino <[email protected]>
AuthorDate: Mon Feb 28 18:04:20 2022 +0100
Release note script: Check if the GITHUB_TOKEN var has been set before
running the command
---
release.adoc | 7 +++++--
script/gen_release_notes.sh | 7 +++++++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/release.adoc b/release.adoc
index 2040d6b..9982c0d 100644
--- a/release.adoc
+++ b/release.adoc
@@ -149,12 +149,15 @@ kamel install
--operator-image=camelk/camel-k:$CAMEL_K_VERSION --maven-repositor
Release notes can be generated with:
```
-# previous version released on same branch, e.g. 1.5.0
+# previous version released on same branch, e.g. 1.8.0
export PREV=a.b.c
-# current version to be released, e.g. 1.6.0
+# current version to be released, e.g. 1.8.1
export CUR=x.y.z
# Branch where both tags are present
export BRANCH=main
+# Personal access Token for accessing Github API
+export GITHUB_TOKEN=token
+# Run the release-notes command
./script/gen_release_notes.sh $PREV $CUR $BRANCH
```
diff --git a/script/gen_release_notes.sh b/script/gen_release_notes.sh
index 4842b1f..75b4380 100755
--- a/script/gen_release_notes.sh
+++ b/script/gen_release_notes.sh
@@ -58,4 +58,11 @@ if [ $? -ne 0 ]; then
fi
set -e
+set +e
+if [ -z "${GITHUB_TOKEN}" ]; then
+ echo "No \"GITHUB_TOKEN\" environment variable exported. Please set the
GITHUB_TOKEN environment variable"
+ exit 1
+fi
+set -e
+
release-notes --start-sha $start_sha --end-sha $end_sha --branch $branch
--repo camel-k --org apache --output $location/../release-notes.md
--required-author ""