From 017f05984eb5b66b25cec19ce2de5daf7d82cfe6 Mon Sep 17 00:00:00 2001 From: Andres Almiray Date: Sun, 9 May 2021 19:24:56 +0200 Subject: [PATCH] Document latest changes --- docs/modules/ROOT/pages/artifacts.adoc | 2 ++ .../configuration/pages/name-templates.adoc | 28 +++++++++++++++---- .../configuration/partials/platform.adoc | 6 ++-- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/docs/modules/ROOT/pages/artifacts.adoc b/docs/modules/ROOT/pages/artifacts.adoc index 2647ba5..d0dd62b 100644 --- a/docs/modules/ROOT/pages/artifacts.adoc +++ b/docs/modules/ROOT/pages/artifacts.adoc @@ -24,6 +24,8 @@ This property is *optional*. * `platform`. Defines the OS specific platform for this file. Some xref:configuration:assemble/index.adoc[assemblers] and xref:configuration:packagers/index.adoc[packagers] require that artifacts define a platform. +* `extraPproperties`. Defines key/value pairs of metadata that's related to the artifact. + include::configuration:partial$platform.adoc[] Globs have the following properties: diff --git a/docs/modules/configuration/pages/name-templates.adoc b/docs/modules/configuration/pages/name-templates.adoc index e3dd707..615a27d 100644 --- a/docs/modules/configuration/pages/name-templates.adoc +++ b/docs/modules/configuration/pages/name-templates.adoc @@ -554,6 +554,9 @@ Additional names become available when the artifact defines a `platform` | artifact{{CapitalizedPlatform}}Name | the name of the artifact file without extension |=== +Additionally, every key/value from `artifact.extraProperties` is mapped with `artifact` as key prefix for the first +artifact, and `artifact{{CapitalizedPlatform}}` for all artifacts, and the capitalized key. + Thus, for artifacts defined as [tabs] @@ -567,6 +570,8 @@ distributions: app: artifacts: - path: path/to/{{distributionName}}-{{projectVersion}}.zip + extraProperties: + main: true - path: path/to/{{distributionName}}-{{projectVersion}}-mac.zip platform: osx ---- @@ -575,11 +580,13 @@ TOML:: [source,toml] [subs="+macros"] ---- -[distributions.app] - artifact = [ - { path = "path/to/{{distributionName}}-{{projectVersion}}.zip" }, - { path = "path/to/{{distributionName}}-{{projectVersion}}-mac.zip", platform = "osx" } - ] +pass:[[[distributions.app.artifact]]] + path: "path/to/{{distributionName}}-{{projectVersion}}.zip" + extraProperties.main = true + +pass:[[[distributions.app.artifact]]] + path = "path/to/{{distributionName}}-{{projectVersion}}-mac.zip" + platform = "osx" ---- JSON:: + @@ -591,7 +598,11 @@ JSON:: "app": { "artifacts": [ { - "path": "path/to/{{distributionName}}-{{projectVersion}}.zip" + "path": "path/to/{{distributionName}}-{{projectVersion}}.zip", + "extraProperties": + { + "main": true + } }, { "path": "path/to/{{distributionName}}-{{projectVersion}}-mac.zip", @@ -613,6 +624,9 @@ Maven:: path/to/${project.artifactId}-${project.version}.zip + +
true
+
path/to/${project.artifactId}-${project.version}-mac.zip @@ -634,6 +648,7 @@ jreleaser { artifacts { artifact { path = "path/to/${project.name}-${project.version}.zip" + extraProperties.put("main", true) } artifact { path = "path/to/${project.name}-${project.version}-mac.zip" @@ -654,6 +669,7 @@ The following names will be calculated: * artifactSha256 * artifactFileName: `${project.name}-${project.version}.zip` * artifactName: `${project.name}-${project.version}` +* artifactMain: true * distributionUrl * distributionSha256 * distributionArtifactFileName: `${project.name}-${project.version}.zip` diff --git a/docs/modules/configuration/partials/platform.adoc b/docs/modules/configuration/partials/platform.adoc index 30fd894..2e27c51 100644 --- a/docs/modules/configuration/partials/platform.adoc +++ b/docs/modules/configuration/partials/platform.adoc @@ -2,7 +2,7 @@ The value of `platform` is dictated by the normalized values detected by link:https://github.com/trustin/os-maven-plugin[os-maven-plugin]. You may use the plain `platform` value or append a `arch` classifier. The following values are currently recognized: -platform:: `aix`, `hpux`, `os400`, `linux`, `osx`, `freebsd`, `openbsd`, `netbsd`, `sunos`, `windows`, `zos`. +platform:: `aix`, `hpux`, `os400`, `linux`, `linux_musl`, `osx`, `freebsd`, `openbsd`, `netbsd`, `sunos`, `windows`, `zos`. arch:: `x86_64`, `x86_32`, `itanium_64`, `itanium_32`, `sparc_32`, `sparc_64`, `arm_32`, `aarch_64`, `mips_32`, `mipsel_32`, `mips_64`, `mipsel_64`, `ppc_32`, `ppcle_32`, `ppc_64`, `ppcle_64`, `s390_32`, `s390_64`, `riscv` @@ -12,4 +12,6 @@ Examples: * `osx-arm` * `windows` * `linux` -* `linux-x86_64` +* `linux-x8w6_64` + +TIP: Use `linux_musl` for artifacts that target Alpine Linux.