1 Star 0 Fork 125

douxin/openGauss-connector-jdbc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
release_notes.sh 1.96 KB
一键复制 编辑 原始数据 按行查看 历史
lishifu 提交于 2020-06-30 14:58 . first commit for openGauss connector jdbc
#!/bin/bash
CURRENT_VERSION=`mvn -B -N org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\['`
VERS=${CURRENT_VERSION/-SNAPSHOT}
DATE_YMD=$(date '+%Y-%m-%d')
RELEASE_FILE=$(find docs/_posts -name "*-$VERS-release.md" | head -n 1)
if [[ "x$RELEASE_FILE" == "x" ]]; then
RELEASE_FILE=docs/_posts/$DATE_YMD-$VERS-release.md
fi
echo file: $RELEASE_FILE
if [ -f $RELEASE_FILE ]; then
if [[ "x$1" == "x-o" ]]; then
echo Removing file $RELEASE_FILE
rm "$RELEASE_FILE"
fi
fi
if [ -f $RELEASE_FILE ]; then
echo File $RELEASE_FILE already exists. If you want to overwrite it, pass -o parameter
else
# Makes all the output get printed to the file as well (concept from http://stackoverflow.com/a/3403786/267224)
exec > >(tee -a $RELEASE_FILE)
exec 2>&1
fi
PREV_VERSION=`git describe --match 'REL*' --abbrev=0`
echo ---
echo title: "PostgreSQL JDBC Driver ${VERS} Released"
echo date: $(date '+%Y-%m-%d %H:%M:%S %z')
echo categories:
echo ' - new_release'
echo version: ${VERS}
echo ---
echo **Notable changes**
echo
awk "/^## \[Unreleased\]/,/^## \[${PREV_VERSION:3}\]/ {print}" CHANGELOG.md | sed -e '1d' -e '$d'
echo
echo '<!--more-->'
echo
echo **Commits by author**
echo
git shortlog --format="%s@@@%H@@@%h@@@" --grep="maven-release-plugin|update versions in readme.md" --extended-regexp --invert-grep --no-merges $PREV_VERSION..HEAD | perl release_notes_filter.pl ${VERS}
# Update CHANGELOG.md with the new version
NL=$'\n'
if grep -q "$VERS" CHANGELOG.md; then
: # nothing to do here, CHANGELOG has already been updated
else
sed -i -e "s/^## \[Unreleased\]$/## [Unreleased]\\$NL### Changed\\$NL\\$NL### Added\\$NL\\$NL### Fixed\\$NL\\$NL## [${VERS}] (${DATE_YMD})/" CHANGELOG.md
sed -i -e "s/^\[Unreleased\]: /[${VERS}]: /" CHANGELOG.md
sed -i -e "s/$PREV_VERSION\.\.\.HEAD/$PREV_VERSION...REL${VERS}/" CHANGELOG.md
echo "[Unreleased]: https://github.com/pgjdbc/pgjdbc/compare/REL${VERS}...HEAD" >> CHANGELOG.md
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/ywzq1161327784/openGauss-connector-jdbc.git
git@gitee.com:ywzq1161327784/openGauss-connector-jdbc.git
ywzq1161327784
openGauss-connector-jdbc
openGauss-connector-jdbc
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385