fix(deploy): Honor dry-run settings before querying Gitlab packages. Fixes
@@ -78,6 +78,7 @@ public class GitlabMavenDeployer extends AbstractMavenDeployer<org.jreleaser.mod
Gitlab api = createApi(baseUrl, token);
List<GlPackage> glPackages = new ArrayList<>();
+ if (!context.isDryrun()) {
try {
glPackages.addAll(api.listPackages(Integer.parseInt(deployer.getProjectIdentifier()), "maven"));
} catch (IOException e) {
@@ -91,6 +92,7 @@ public class GitlabMavenDeployer extends AbstractMavenDeployer<org.jreleaser.mod
deletePackage(api, deployable, glPackages);
}
}
+ }
for (Deployable deployable : deployables) {
if (!deployable.getFilename().endsWith(".jar") &&
