Skip to content

Commit

Permalink
[MRELEASE-1099] Use shallow checkout/clone during release:perform
Browse files Browse the repository at this point in the history
This closes #139
  • Loading branch information
BigMichi1 authored and michael-o committed Jul 30, 2022
1 parent a197ada commit cc7d3b6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions maven-release-manager/src/main/mdo/release-descriptor.mdo
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,10 @@
{
return false;
}
if ( !java.util.Objects.equals( scmShallowClone, that.isScmShallowClone() ) )
{
return false;
}
if ( !java.util.Objects.equals( scmReleaseCommitComment, that.getScmReleaseCommitComment() ) )
{
return false;
Expand Down Expand Up @@ -1087,6 +1091,7 @@
result = 29 * result + java.util.Objects.hashCode( pomFileName );
result = 29 * result + java.util.Objects.hashCode( checkModificationExcludes );
result = 29 * result + java.util.Objects.hashCode( scmDevelopmentCommitComment );
result = 29 * result + java.util.Objects.hashCode( scmShallowClone );
result = 29 * result + java.util.Objects.hashCode( scmReleaseCommitComment );
result = 29 * result + java.util.Objects.hashCode( scmBranchCommitComment );
result = 29 * result + java.util.Objects.hashCode( scmRollbackCommitComment );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ public class PerformReleaseMojo
@Parameter( property = "password" )
private String password;

/**
* When cloning a repository if it should be a shallow clone or a full clone.
*/
@Parameter( defaultValue = "true", property = "scmShallowClone" )
private boolean scmShallowClone = true;

/**
* Whether to use the default release profile (Maven 2 and 3) that adds sources and javadocs to the released
* artifact, if appropriate. If set to true, the release plugin sets the property "<code>performRelease</code>" to
Expand Down Expand Up @@ -183,6 +189,8 @@ public void execute()
releaseDescriptor.setScmPassword( password );
}

releaseDescriptor.setScmShallowClone( scmShallowClone );

releaseDescriptor.setLocalCheckout( localCheckout );

releaseDescriptor.setCheckoutDirectory( workingDirectory.getAbsolutePath() );
Expand Down

0 comments on commit cc7d3b6

Please sign in to comment.