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

[MRELEASE-1099] allow using a shallow clone during release:perform #139

Merged
merged 1 commit into from
Jul 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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