Skip to content

Commit 4137dd2

Browse files
committed
fix changelog generation
1 parent df2b5e4 commit 4137dd2

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

copyClickhouseRepoDocs.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,13 @@ echo "[$SCRIPT_NAME] Copying completed"
3131

3232
echo "[$SCRIPT_NAME] Generate changelog"
3333
cp docs/en/_placeholders/changelog/_index.md docs/en/whats-new/changelog/index.md
34-
if grep -q '^# $(date +%Y) Changelog' ClickHouse/CHANGELOG.md; then
35-
sed '/^# $(date +%Y) Changelog/d' ClickHouse/CHANGELOG.md > temp.txt
36-
cat >> docs/en/whats-new/changelog/index.md
37-
rm temp.txt
34+
if grep -q "^# $(date +%Y) Changelog" ClickHouse/CHANGELOG.md; then
35+
echo "Generating $(date +%Y) Changelog..."
36+
sed "/^# $(date +%Y) Changelog/d" ClickHouse/CHANGELOG.md > temp.txt
37+
echo "Changelog copied to temp.txt"
38+
cat temp.txt >> docs/en/whats-new/changelog/index.md
39+
echo "Changelog written to docs/en/whats-new/changelog/index.md"
40+
rm -f temp.txt
3841
echo "$(date +%Y) Changelog was updated."
3942
else
4043
current_year="$(date +%Y)"

0 commit comments

Comments
 (0)