加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
consolidate-relnotes.bash 587 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env bash
set -e
usage='usage: consolidate-relnotes.bash <new-release-version> <prev-release-version>'
die() {
echo "$@" 1>&2; exit 1
}
test "$#" = 2 || die "$usage"
files="$(ls Help/release/dev/* | grep -v Help/release/dev/0-sample-topic.rst)"
title="CMake $1 Release Notes"
underline="$(echo "$title" | sed 's/./*/g')"
echo "$title
$underline
.. only:: html
.. contents::
Changes made since CMake $2 include the following." > Help/release/"$1".rst
tail -q -n +3 $files >> Help/release/"$1".rst
sed -i "/^ $2 / i\\
$1 <$1>" Help/release/index.rst
rm $files
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化