Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Option to disable semver format validation #70

Closed
wants to merge 3 commits into from

Conversation

herchu
Copy link

@herchu herchu commented Oct 21, 2018

In our project we use a different (non semver) tag format, resulting in (almost) all tags being ignored by auto-changelog.

This tags adds a flag -d or --disable-semver to disable tag parsing by semver. In this mode, all tags are fetched and listed; and sorted just lexicographically (with String's localeCompare()). It also adds a warning with the count of ignored tags in the default (semver) mode, so you know why your tags are not being listed in the changelog.

Example output:

$ ../auto-changelog/lib/index.js
8187 bytes written to CHANGELOG.md. (45 invalid semver tags)
$ ../auto-changelog/lib/index.js -d
101710 bytes written to CHANGELOG.md

And output of -h now includes:

...
  -d, --disable-semver             disable semantic versioning (semver), uses raw tags
...

@herchu herchu mentioned this pull request Oct 21, 2018
@cookpete cookpete closed this in 509be3c Nov 8, 2018
@herchu
Copy link
Author

herchu commented Nov 8, 2018

It would be nice to know why the pull request gets simply closed without a single comment -- it is not very encouraging to see a contribution is simply ignored. Just my opinion.

@cookpete
Copy link
Owner

cookpete commented Nov 9, 2018

@herchu Massive apologies.. I made a mental note to follow this up after publishing 1.9.0 but completely forgot.

I liked your idea but thought a more flexible solution would be to specify a regex pattern of tag names to use for releases, so I've added a --tag-pattern option in 1.9.0.

In your case you wanted to ignore the semver validation of tags and just accept any tag as a release, so you should be able to use auto-changelog --tag-pattern .+ to get the same effect.

Huge thanks for the PR and sorry again for the delay and lack of any feedback. Would be great to know if this works for you and any other feedback you have.

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