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

checkVersion Task fails for 4-digit version numbers #479

Closed
robertpanzer opened this issue Jul 8, 2016 · 3 comments
Closed

checkVersion Task fails for 4-digit version numbers #479

robertpanzer opened this issue Jul 8, 2016 · 3 comments

Comments

@robertpanzer
Copy link
Member

When trying to build a release with a 4-digit version number like 1.5.4.1 the check version task fails with an exception:

* Where:
Script '/Users/robertpanzer/dev/asciidoctorj/gradle/versioncheck.gradle' line: 40

* What went wrong:
Execution failed for task ':asciidoctorj:checkVersion'.
> com.github.zafarkhaja.semver.UnexpectedCharacterException (no error message)
@ancho
Copy link
Contributor

ancho commented Jul 9, 2016

The java-semver library throws an exception if a version does not match the criteria of a semantic version. A 4 digit number is not valid. I actually don't know how maven handles this internally.
But it really doesn't matter in this situation.
I'll catch the exception and log a warning. PR follows...

@robertpanzer
Copy link
Member Author

👍 For now I simply skipped the task.

@ancho
Copy link
Contributor

ancho commented Jul 9, 2016

Hmm...maybe the tasks should be more isolated. At present the check task depends on checkVersion.
If something goes wrong in case of an exception the whole build will fail.
The tasks should be a helper not a blocker. I suggest to remove the task dependency.

ancho added a commit to ancho/asciidoctorj that referenced this issue Jul 9, 2016
Prevent stopping  check Task if an exception happens during checkVersion execution.
Print proper warning message if a version violates semantic versioning.

Closes asciidoctor#479
robertpanzer pushed a commit to robertpanzer/asciidoctorj that referenced this issue Jul 16, 2016
Prevent stopping  check Task if an exception happens during checkVersion execution.
Print proper warning message if a version violates semantic versioning.

Closes asciidoctor#479
abelsromero pushed a commit to abelsromero/asciidoctorj that referenced this issue Dec 14, 2016
Prevent stopping  check Task if an exception happens during checkVersion execution.
Print proper warning message if a version violates semantic versioning.

Closes asciidoctor#479
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

No branches or pull requests

2 participants