use of org.jreleaser.util.Constants.KEY_GOFISH_PACKAGES in project jreleaser by jreleaser.
the class GofishPackagerProcessor method fillPackagerProperties.
@Override
protected void fillPackagerProperties(Map<String, Object> props, Distribution distribution) throws PackagerProcessingException {
List<Artifact> artifacts = collectArtifacts(distribution);
List<GofishPackage> packages = artifacts.stream().filter(artifact -> isNotBlank(artifact.getPlatform())).map(artifact -> new GofishPackage(props, context, distribution, artifact)).collect(toList());
if (packages.isEmpty()) {
for (Artifact artifact : artifacts) {
if (isNotBlank(artifact.getPlatform()))
continue;
for (String os : new String[] { "darwin", "linux", "windows" }) {
for (String arch : new String[] { "x86_64", "aarch64" }) {
Artifact copy = artifact.copy();
copy.setPlatform(os + "-" + arch);
packages.add(new GofishPackage(props, context, distribution, copy));
}
}
}
}
props.put(KEY_GOFISH_PACKAGES, packages);
}
Aggregations