Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

hasAnyVersionTags not counting semver tags that doesn't start with 'v' #242

Closed
elmernocon opened this issue Apr 11, 2021 · 1 comment · Fixed by #303
Closed

hasAnyVersionTags not counting semver tags that doesn't start with 'v' #242

elmernocon opened this issue Apr 11, 2021 · 1 comment · Fixed by #303
Labels
bug Something isn't working

Comments

@elmernocon
Copy link

elmernocon commented Apr 11, 2021

Bug description

How to reproduce

Create tags that doesn't start with v. i.e. 0.0.1, 1.0.0, 1.0, etc.

git tag --list
1
1.2
1.2.3
11.11.11
2,2,2
v0HELLO
v1
v1.2
v1.2.3
v11.11.11
x1.0.0

Current

git tag --list | grep v[0-9]*
v0HELLO
v1
v1.2
v1.2.3
v11.11.11

Expected behavior

git tag --list | grep '^v\?[0-9]\+\(\.[0-9]\+\)\?\(\.[0-9]\+\)\?$'
1
1.2
1.2.3
11.11.11
v1
v1.2
v1.2.3
v11.11.11
-      input: Buffer.from('git tag --list --merged HEAD | grep v[0-9]* | wc -l'),
+      input: Buffer.from('git tag --list --merged HEAD | grep '^v\?[0-9]\+\(\.[0-9]\+\)\?\(\.[0-9]\+\)\?$' | wc -l'),

Or more permissive:

git tag --list | grep '^v\?[0-9]\+'
1
1.2
1.2.3
11.11.11
2,2,2
v0HELLO
v1
v1.2
v1.2.3
v11.11.11
-      input: Buffer.from('git tag --list --merged HEAD | grep v[0-9]* | wc -l'),
+      input: Buffer.from('git tag --list --merged HEAD | grep '^v\?[0-9]\+' | wc -l'),
@elmernocon elmernocon added the bug Something isn't working label Apr 11, 2021
davidmfinol added a commit that referenced this issue Dec 10, 2021
davidmfinol added a commit that referenced this issue Jan 2, 2022
…303)

* Fixes #242

* Update semver version

* Update husky

* Update husky pre-commit hook

* Update dependencies

* Update dependencies

* Remove git add since changes will be automatically added

* Restore git add

* Update dependencies

* Update test
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants