katana/changelog.sh

32 lines
744 B
Bash
Raw Normal View History

2014-12-22 21:23:12 +00:00
#!/bin/bash
set -e
date="$1"
if [ -z "$1" ];then
# git pull --tags
date="$(git log --tags --simplify-by-decoration --pretty='%ad' --date='short' | head -n1)"
fi
2014-12-22 21:23:12 +00:00
packs=("ariya-icons" "kdelibs" "kde-baseapps" "kde-workspace" "kde-extraapps" "kde-l10n")
cwd="$(pwd)"
if [ -z "$date" ];then
echo "Pass a date"
2014-12-22 21:23:12 +00:00
exit 1
fi
# source "$(dirname $0)/fetch.sh"
2014-12-22 21:23:12 +00:00
changes=""
for p in "${packs[@]}";do
echo "Generating changes for $p as of $date..."
2014-12-22 21:23:12 +00:00
cd "$p"
changes+="\nChanges to $p since $date:"
pchanges="$(git log --no-merges --since=$date --format=' * %s' | sort -u)"
2014-12-26 20:58:25 +00:00
if [ -z "$pchanges" ];then
pchanges=" * none"
fi
changes+="\n$pchanges\n"
2014-12-22 21:23:12 +00:00
cd "$cwd"
done
echo -e "$changes" > changelog.txt