Skip to content

Commit

Permalink
Auto-detect CHANGELOG.md or CHANGELOG files
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdowling committed Oct 29, 2014
1 parent 62113fd commit e47d2c7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions chag
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,11 @@ while [ $# -gt 0 ]; do
esac
done

# Find the default changelog and ensure the changelog file exits.
FILENAME=${FILENAME:=`pwd`"/CHANGELOG.md"}
# Find the default changelog if needed.
if [ -z "$FILENAME" ]; then
FILENAME=`pwd`"/CHANGELOG.md"
[ -f "$FILENAME" ] || FILENAME=`pwd`"/CHANGELOG"
fi
[ -f "$FILENAME" ] || die "File not found: $FILENAME"

$COMMAND $opt $@

0 comments on commit e47d2c7

Please sign in to comment.