Skip to content

Commit

Permalink
Merge pull request #75 from egineering-llc/hotfix/1.7.2
Browse files Browse the repository at this point in the history
Hotfix/1.7.2
  • Loading branch information
bvarner authored May 24, 2017
2 parents a002a6a + d2eb0e6 commit 2cff52b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<groupId>com.e-gineering</groupId>
<artifactId>gitflow-helper-maven-plugin</artifactId>

<version>1.7.1</version>
<version>1.7.2</version>
<packaging>maven-plugin</packaging>

<name>gitflow-helper-maven-plugin</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ public static String resolveUrlOrExpression(final MavenProject project, final Lo
if (StringUtils.isBlank(connectionUrl)) {
connectionUrl = project.getScm().getConnection();
}
return connectionUrl;

// Issue #74, missing an emtpy / null check before returning.
if (!StringUtils.isBlank(connectionUrl)) {
return connectionUrl;
}
}

return DEFAULT_URL_EXPRESSION;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.apache.maven.scm.ScmException;
import org.apache.maven.scm.ScmFileSet;
import org.apache.maven.scm.ScmTagParameters;
import org.apache.maven.scm.command.tag.TagScmResult;
import org.apache.maven.scm.provider.ScmProvider;
import org.apache.maven.scm.repository.ScmRepository;

Expand Down Expand Up @@ -51,7 +52,15 @@ protected void execute(final GitBranchType type, final String gitBranch, final S
ScmTagParameters tagParams = new ScmTagParameters("Release tag [" + sanitizedTag + "] generated by gitflow-helper-maven-plugin.");
tagParams.setRemoteTagging(true);

provider.tag(repository, new ScmFileSet(project.getBasedir()), sanitizedTag, tagParams);
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() );
}
} catch (ScmException scme) {
throw new MojoFailureException("Unable to tag master branch.", scme);
}
Expand Down

0 comments on commit 2cff52b

Please sign in to comment.