Skip to content

Commit 0391f2d

Browse files
committed
Breaking change, swapping begin and end of revision range
1 parent 68b2530 commit 0391f2d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

release-notes.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,20 @@ _validateGitRef() {
5050

5151
_findGitHeads() {
5252

53-
GIT_TAG=${2:-HEAD}
53+
GIT_TAG=${1:-HEAD}
5454

5555
if test "HEAD" = "$GIT_TAG"
5656
then
5757
GIT_TAG=$(git describe --always --tags "$GIT_TAG")
5858
fi
5959

60-
GIT_START_REF=$(_findLastTag "$1" "$GIT_TAG")
60+
GIT_START_REF=$(_findLastTag "$GIT_TAG" "$2")
6161
}
6262

6363
# A more reliable way to find last tag
6464
# instead of `git tag --sort=-creatordate | head -1`
6565
_findLastTag() {
66-
local lasttag="$1"
66+
local lasttag="$2"
6767

6868
# find last tag in current tree
6969
if test -z "$lasttag"; then
@@ -91,7 +91,7 @@ Name:
9191
`basename $0` Generate release notes based on Github pull request title from given two git-refs
9292
9393
Usage:
94-
`basename $0` [<lasttagname>] [<commit-ish>]
94+
`basename $0` [<commit-ish>] [<lasttagname>]
9595
9696
Options:
9797
-l, --list
@@ -100,12 +100,12 @@ Options:
100100
-h, --help
101101
print this help
102102
103-
<lasttagname>
104-
represents the beginning of revision range. Defaults to last <tagname>
105-
106103
<commit-ish>
107104
Commit-ish object names, branch or tagname represents the end of revision range. Defaults to HEAD
108105
106+
<lasttagname>
107+
represents the beginning of revision range. Defaults to last <tagname>
108+
109109
Example:
110110
111111
`basename $0`

0 commit comments

Comments
 (0)