Merge branch 'changelog'

This commit is contained in:
Tj Holowaychuk 2010-08-05 08:08:52 -07:00
commit 32a413f2d2
4 changed files with 77 additions and 0 deletions

View file

@ -0,0 +1,17 @@
0.0.1 / 2010-08-05
==================
* Docs for git-ignore. Closes #3
* Merge branch 'ignore'
* Added git-ignore
* Readme typo
* Fixed <tag> in docs
* Install docs
* Merge branch 'release'
* Added git-release
* Fixed readme
* Readme
* Passing args to git shortlog
* Added --all support to git-count
* Initial commit

View file

@ -3,6 +3,7 @@ PREFIX = /usr/local
BINS = bin/git-count \
bin/git-ignore \
bin/git-changelog \
bin/git-release
install:
@ -11,6 +12,7 @@ install:
uninstall:
rm -f $(PREFIX)/bin/git-count
rm -f $(PREFIX)/bin/git-ignore
rm -f $(PREFIX)/bin/git-changelog
rm -f $(PREFIX)/bin/git-release
.PHONY: install uninstall

View file

@ -60,3 +60,39 @@
... added 'build'
... added '*.o'
... added '*.log'
## git-changelog
Populates the file named matching _change|history -i_ with the commits
since the previous tag or since the project began when no tags are present. Opens the changelog in **$EDITOR** when set.
$ git changelog
n.n.n / 2010-08-05
==================
* Docs for git-ignore. Closes #3
* Merge branch 'ignore'
* Added git-ignore
* Fixed <tag> in docs
* Install docs
* Merge branch 'release'
* Added git-release
* Passing args to git shortlog
* Added --all support to git-count
* Initial commit
Listing commits:
$ git changelog --list
* Docs for git-ignore. Closes #3
* Merge branch 'ignore'
* Added git-ignore
* Fixed <tag> in docs
* Install docs
* Merge branch 'release'
* Added git-release
* Passing args to git shortlog
* Added --all support to git-count
* Initial commit

22
bin/git-changelog Executable file
View file

@ -0,0 +1,22 @@
#!/usr/bin/env sh
CHANGELOG=`ls | egrep 'change|history' -i`
DATE=`date +'%Y-%m-%d'`
HEAD="\nn.n.n / $DATE \n==================\n"
if test "$1" = "--list"; then
version=`git tag | tail -n 1`
if test -z "$version"; then
git log --pretty="format: * %s"
else
git log --pretty="format: * %s" $version..
fi
else
tmp="/tmp/changelog"
echo $HEAD > $tmp
git-changelog --list >> $tmp
echo '' >> $tmp
cat $CHANGELOG >> $tmp
mv $tmp $CHANGELOG
test -n "$EDITOR" && $EDITOR $CHANGELOG
fi