aboutsummaryrefslogtreecommitdiff
path: root/script/git-changelog
diff options
context:
space:
mode:
author135e2 <[email protected]>2023-01-19 17:48:24 +0800
committer135e2 <[email protected]>2023-01-19 18:08:17 +0800
commitcf4d7d94a865812b333614c9afc3254c5e5b2fa6 (patch)
tree2044f207568253fffb3cc6618cecbf7e90a6776c /script/git-changelog
parentaefb5a0182850f905af2cd71cf9e3ea825bf23a3 (diff)
downloadMeaninglessRecords-cf4d7d94a865812b333614c9afc3254c5e5b2fa6.tar.gz
MeaninglessRecords-cf4d7d94a865812b333614c9afc3254c5e5b2fa6.tar.bz2
MeaninglessRecords-cf4d7d94a865812b333614c9afc3254c5e5b2fa6.zip
feat: add a scriptlet to generate changelog
Diffstat (limited to 'script/git-changelog')
-rwxr-xr-xscript/git-changelog37
1 files changed, 37 insertions, 0 deletions
diff --git a/script/git-changelog b/script/git-changelog
new file mode 100755
index 0000000..9072c34
--- /dev/null
+++ b/script/git-changelog
@@ -0,0 +1,37 @@
+#!/bin/bash
+# Generates changelog day by day
+# Ref: https://stackoverflow.com/questions/2976665/git-changelog-day-by-day/4712213#4712213
+gen_changelog() {
+ echo =====================
+ git log --no-merges --format="%cd" --date=short | sort -u -r | while read -r DATE ; do
+ echo
+ echo ["$DATE"]
+ GIT_PAGER="cat" git log --no-merges --format=" * %s" --since="$DATE 00:00:00" --until="$DATE 24:00:00"
+ done
+
+}
+
+# shellcheck disable=SC2016
+echo '---
+title: Changelog
+---
+
+## Description
+This page contains the changelog of the repos used to generate the website, generated by `script/git-changelog > source/changelog/index.md`
+
+---
+
+### 135e2/MeaninglessRecords
+
+' # Header
+gen_changelog
+
+cd themes/chromate || exit
+echo "
+---
+
+### 135e2/chromate
+
+"
+gen_changelog
+