Skip to content

Commit 9fce626

Browse files
yangrong688ulysses-you
authored andcommitted
[KYUUBI #2211] [Improvement] Add CHANGELOG.md to codebase for maintaining release notes
### _Why are the changes needed?_ Add generate_changelog.sh script to simple generate changelog for Apache Incubating Kyuubi. I've searched there are generaly three ways to generate changelog 1. add change log manually in ervery pr ([Apache Skywalking](https://github.com/apache/skywalking/pull/8881/files#diff-e4d10d406c447edb82b7e7958bebc5ff8ca9123076cf138b4e0ba037fa873055)) 2. use github action to generate ([sqlfluff](https://github.com/sqlfluff/sqlfluff/blob/main/.github/release-drafter.yml)) 3. use script to generate changelog I choose to write a script to generate changelog, it does not rely on github and we can use it more conviniently as there maybe mutiple release candidates in the release process. I add a script to generate changelog once we prepare a new release version, it allows release manager to easy generate changelog between last release tag and current release tag. And the changelog doc structure is: $KYUUBI_DIR &ensp;&ensp;&ensp;&ensp;/docs &ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;/changelog &ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;/v1.5.1-incubating.md &ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;... ### _How was this patch tested?_ use `./generate_changelog.sh v1.5.0-incubating v1.5.1-incubating-rc0` to generate v1.5.1-incubating changelog Closes #2501 from yangrong688/KYUUBI-2211. Closes #2211 b3174b4 [yangrong688] Add generate_changelog.sh script to simple generate changelog for Apache Incubating Kyuubi. Authored-by: yangrong688 <yangrong.jxufe@gmail.com> Signed-off-by: ulysses-you <ulyssesyou@apache.org> (cherry picked from commit dd96983) Signed-off-by: ulysses-you <ulyssesyou@apache.org>
1 parent 9466a1a commit 9fce626

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

build/release/generate_changelog.sh

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/usr/bin/env bash
2+
3+
#
4+
# Licensed to the Apache Software Foundation (ASF) under one or more
5+
# contributor license agreements. See the NOTICE file distributed with
6+
# this work for additional information regarding copyright ownership.
7+
# The ASF licenses this file to You under the Apache License, Version 2.0
8+
# (the "License"); you may not use this file except in compliance with
9+
# the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
set -o pipefail
20+
set -e
21+
22+
LAST_RELEASE_TAG=$1
23+
CURRENT_RELEASE_TAG=$2
24+
25+
KYUUBI_DIR="$(cd "$(dirname "$0")"/../..; pwd)"
26+
CHANGELOG_DIR=$KYUUBI_DIR/docs/changelog
27+
RELEASE_VERSION="$(echo $CURRENT_RELEASE_TAG | cut -d "-" -f 1,2)" ## use cut to remove -rc symbol
28+
CHANGELOG_PATH=$CHANGELOG_DIR/"$RELEASE_VERSION.md"
29+
KYUUBI_GITHUB_COMMIT_URL="https://github.com/apache/incubator-kyuubi/commit/"
30+
31+
function usage {
32+
set +x
33+
echo "./generate_changelog.sh - Tool for generate changelog for Kyuubi"
34+
echo ""
35+
echo "Usage:"
36+
echo "+--------------------------------------------------------------------+"
37+
echo "| ./generate_changelog.sh <LAST_RELEASE_TAG> <CURRENT_RELEASE_TAG> |"
38+
echo "+--------------------------------------------------------------------+"
39+
echo "LAST_RELEASE_TAG: - last release tag of kyuubi e.g. v1.5.0-incubating"
40+
echo "CURRENT_RELEASE_TAG: - current release tag of kyuubi e.g. v1.5.1-incubating-rc0"
41+
echo ""
42+
}
43+
44+
source "$KYUUBI_DIR/build/util.sh"
45+
46+
if [ "${LAST_RELEASE_TAG}" = "-h" ]; then
47+
usage
48+
exit 0
49+
fi
50+
51+
## Add title for changelog doc.
52+
echo "## Changelog for Apache Incubating Kyuubi $RELEASE_VERSION " > $CHANGELOG_PATH
53+
## Append well-formatted git log to changelog file.
54+
git log --pretty="- [%s]($KYUUBI_GITHUB_COMMIT_URL%h) " $LAST_RELEASE_TAG..$CURRENT_RELEASE_TAG | grep -v "\[RELEASE\]" >> $CHANGELOG_PATH

docs/changelog/v1.5.1-incubating.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## Changelog for Apache Incubating Kyuubi v1.5.1-incubating
2+
- [[KYUUBI #2354] Fix NPE in process builder log capture thread](https://github.com/apache/incubator-kyuubi/commit/5e76334)
3+
- [[KYUUBI #2296] Fix operation log file handler leak](https://github.com/apache/incubator-kyuubi/commit/809ea2a)
4+
- [[KYUUBI #2266] The default value of frontend.connection.url.use.hostname should be set to true to be consistent with previous versions](https://github.com/apache/incubator-kyuubi/commit/d3e25f0)
5+
- [[KYUUBI #2255]The engine state of Spark's EngineEvent is hardcoded with 0](https://github.com/apache/incubator-kyuubi/commit/2af8bbb)
6+
- [[KYUUBI #2008][FOLLOWUP] Support engine type and subdomain in kyuubi-ctl](https://github.com/apache/incubator-kyuubi/commit/d1a2dda)
7+
- [[KYUUBI #2156][FOLLOWUP] Fix configuration format in document](https://github.com/apache/incubator-kyuubi/commit/5225b54)
8+
- [[KYUUBI #2156] Change log to reflect exactly why getting token failed](https://github.com/apache/incubator-kyuubi/commit/21ca754)
9+
- [[KYUUBI #2134] Respect Spark bundled log4j in extension modules](https://github.com/apache/incubator-kyuubi/commit/30dc84b)
10+
- [[KYUUBI #2150] [DOCS] Fix Getting Started With Kyuubi on Kubernetes](https://github.com/apache/incubator-kyuubi/commit/e232a83)

0 commit comments

Comments
 (0)