tag-master ignores git tag errors
schmid-hanspeter opened this issue · 3 comments
schmid-hanspeter commented
In TagMasterMojo the return value of the call to provider.tag(..)
is ignored. The following fix takes this return value into account and produces an error log and exception exactly like maven's scm
plugin would:
final TagScmResult tagScmResult = provider.tag(repository, new ScmFileSet(project.getBasedir()), sanitizedTag, tagParams);
if (!tagScmResult.isSuccess()) {
getLog().error("Provider message:");
getLog().error(tagScmResult.getProviderMessage());
getLog().error("Command output:");
getLog().error(tagScmResult.getCommandOutput());
throw new MojoFailureException(tagScmResult.getProviderMessage());
}
I have had tag-master silently fail on me because of, for example, a duplicate tag.
bvarner commented
Care to send this as a PR? :-)
schmid-hanspeter commented
PR sent :-)
bvarner commented
Thanks for the submission!
It's merged to development.