-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathchangelog-maker-lite
executable file
·24 lines (22 loc) · 1.34 KB
/
changelog-maker-lite
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash
#########################################################################
# ChangeLog Maker (lite) #
# #
# Quickly creates CHANGELOG.md entries suitable for GitHub from #
# the repo's commit log. #
# #
# Part of HopeSeekr's BashScripts Collection #
# https://github.com/hopeseekr/BashScripts/ #
# #
# Copyright © 2020 Theodore R. Smith <[email protected]> #
# GPG Fingerprint: 4BF8 2613 1C34 87AC D28F 2AD8 EB24 A91D D612 5690 #
# #
# License: Creative Commons Attribution v4.0 International #
#########################################################################
if [ -z "$1" ]; then
echo "Error: You must provide a git hash/tag/etc"
echo " e.g., changelog-maker-lite v1.0.0.."
exit 1
fi
# @see https://stackoverflow.com/a/12900372/430062
git log --pretty=shortlog --date=iso --reverse "$1" | awk '{print "* ["$3" "$4" CDT] - " substr($0, index($0, $9))}'