mirror of
https://github.com/jlengrand/jreleaser.git
synced 2026-03-10 08:31:24 +00:00
[changelog] skip full validation. Resolves #297
This commit is contained in:
@@ -33,4 +33,9 @@ public class Changelog extends AbstractModelCommand {
|
||||
protected void doExecute(JReleaserContext context) {
|
||||
Workflows.changelog(context).execute();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JReleaserContext.Mode getMode() {
|
||||
return JReleaserContext.Mode.CHANGELOG;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,6 +87,7 @@ public class ModelConfigurer {
|
||||
}
|
||||
break;
|
||||
case FULL:
|
||||
default:
|
||||
if (errors.hasErrors()) {
|
||||
throw new JReleaserException("JReleaser has not been properly configured.");
|
||||
}
|
||||
|
||||
@@ -401,7 +401,8 @@ public class JReleaserContext {
|
||||
|
||||
public enum Mode {
|
||||
ASSEMBLE,
|
||||
FULL
|
||||
FULL,
|
||||
CHANGELOG
|
||||
}
|
||||
|
||||
private static class SortedProperties extends Properties {
|
||||
|
||||
@@ -37,6 +37,10 @@ import static org.jreleaser.model.validation.NativeImageValidator.validateNative
|
||||
*/
|
||||
public abstract class AssemblersValidator extends Validator {
|
||||
public static void validateAssemblers(JReleaserContext context, JReleaserContext.Mode mode, Errors errors) {
|
||||
if (mode == JReleaserContext.Mode.CHANGELOG) {
|
||||
return;
|
||||
}
|
||||
|
||||
context.getLogger().debug("assemble");
|
||||
|
||||
Assemble assemble = context.getModel().getAssemble();
|
||||
|
||||
@@ -185,7 +185,7 @@ public abstract class GitServiceValidator extends Validator {
|
||||
}
|
||||
}
|
||||
|
||||
if (mode == JReleaserContext.Mode.FULL) {
|
||||
if (mode != JReleaserContext.Mode.ASSEMBLE) {
|
||||
if (service.isSign() && !model.getSigning().isEnabled()) {
|
||||
if (context.isDryrun()) {
|
||||
service.setSign(false);
|
||||
|
||||
@@ -30,6 +30,10 @@ import static org.jreleaser.model.validation.HttpUploaderValidator.validateHttp;
|
||||
*/
|
||||
public abstract class UploadersValidator extends Validator {
|
||||
public static void validateUploaders(JReleaserContext context, JReleaserContext.Mode mode, Errors errors) {
|
||||
if (mode != JReleaserContext.Mode.FULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
context.getLogger().debug("upload");
|
||||
|
||||
Upload upload = context.getModel().getUpload();
|
||||
|
||||
@@ -29,4 +29,9 @@ public class JReleaserChangelogTask extends AbstractJReleaserTask {
|
||||
protected void doExecute(JReleaserContext context) {
|
||||
Workflows.changelog(context).execute();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JReleaserContext.Mode getMode() {
|
||||
return JReleaserContext.Mode.CHANGELOG;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ package org.jreleaser.gradle.plugin.tasks
|
||||
import groovy.transform.CompileStatic
|
||||
import org.gradle.api.model.ObjectFactory
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.jreleaser.model.JReleaserContext
|
||||
import org.jreleaser.workflow.Workflows
|
||||
|
||||
import javax.inject.Inject
|
||||
@@ -34,6 +35,7 @@ abstract class JReleaserChangelogTask extends AbstractJReleaserTask {
|
||||
@Inject
|
||||
JReleaserChangelogTask(ObjectFactory objects) {
|
||||
super(objects)
|
||||
mode = JReleaserContext.Mode.CHANGELOG
|
||||
}
|
||||
|
||||
@TaskAction
|
||||
|
||||
@@ -21,6 +21,7 @@ import org.apache.maven.plugin.MojoExecutionException;
|
||||
import org.apache.maven.plugin.MojoFailureException;
|
||||
import org.apache.maven.plugins.annotations.Mojo;
|
||||
import org.apache.maven.plugins.annotations.Parameter;
|
||||
import org.jreleaser.model.JReleaserContext;
|
||||
import org.jreleaser.workflow.Workflows;
|
||||
|
||||
/**
|
||||
@@ -47,4 +48,9 @@ public class JReleaserChangelogMojo extends AbstractJReleaserMojo {
|
||||
|
||||
Workflows.changelog(createContext()).execute();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JReleaserContext.Mode getMode() {
|
||||
return JReleaserContext.Mode.CHANGELOG;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user