Skip to content

Commit

Permalink
feat: rename tag:N to @n
Browse files Browse the repository at this point in the history
BREAKING CHANGE: rename

```diff
- tag:0~tag:1
+ @0~@1
```
  • Loading branch information
axetroy committed Nov 27, 2020
1 parent e930b89 commit 76eb777
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion 1_parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type Scope struct {
var (
regShortHash = regexp.MustCompile(`^[a-z\d]{7}$`)
regLongHash = regexp.MustCompile(`^[a-z\d]{40}$`)
regTag = regexp.MustCompile(`^tag:(\d+)$`)
regTag = regexp.MustCompile(`^@(\d+)$`)
)

func getCommitFromHEAD(git *client.GitClient) (*object.Commit, error) {
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ OPTIONS:
--fmt=md.

EXAMPLES:
# generate changelog from HEAD to <latest version>. equivalent to 'whatchanged HEAD~tag:0'
# generate changelog from HEAD to <latest version>. equivalent to 'whatchanged HEAD~@0'
$ whatchanged

# generate changelog of the specified version
Expand All @@ -76,10 +76,10 @@ EXAMPLES:
$ whatchanged v1.3.0~v1.2.0

# generate changelog from HEAD to <Nth tag>
$ whatchanged ~tag:0
$ whatchanged ~@0

# generate changelog from <0th tag> to <2th tag>
$ whatchanged tag:0~tag:2
$ whatchanged @0~@2

# generate changelog from HEAD to specified version
$ whatchanged HEAD~v1.3.0
Expand Down
6 changes: 3 additions & 3 deletions cmd/whatchanged/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ OPTIONS:
--fmt=md.
EXAMPLES:
# generate changelog from HEAD to <latest version>. equivalent to 'whatchanged HEAD~tag:0'
# generate changelog from HEAD to <latest version>. equivalent to 'whatchanged HEAD~@0'
$ whatchanged
# generate changelog of the specified version
Expand All @@ -68,10 +68,10 @@ EXAMPLES:
$ whatchanged v1.3.0~v1.2.0
# generate changelog from HEAD to <Nth tag>
$ whatchanged ~tag:0
$ whatchanged ~@0
# generate changelog from <0th tag> to <2th tag>
$ whatchanged tag:0~tag:2
$ whatchanged @0~@2
# generate changelog from HEAD to specified version
$ whatchanged HEAD~v1.3.0
Expand Down

0 comments on commit 76eb777

Please sign in to comment.