Skip to content

Conversation

@tjaartvdwalt
Copy link

@tjaartvdwalt tjaartvdwalt commented May 7, 2018

I found 2 bugs when using git-release --semver

  1. The version regex greedily matches only the first digit for version numbers that contain multiple digits. Matching the multi digit case first solves this problem.

  2. When doing a major release, the minor and patch version numbers should be reset to 0, and when doing a minor release, the patch number should be reset to 0.

Tjaart van der Walt added 2 commits May 7, 2018 14:44
The original regex will greedily match the first digit of version
numbers that have multiple digits.
There is a bug in the current version:

```
version=1.1.3
./git-release --semver minor
version=1.2.3
```

The correct behavior should be:

```
version=1.1.3
./git-release --semver minor
version=1.2.0
```
@spacewander spacewander merged commit 3802e83 into tj:master May 8, 2018
@spacewander
Copy link
Collaborator

@tjaartvdwalt
Merged. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants