Document latest changes

This commit is contained in:
Andres Almiray
2021-05-09 19:24:56 +02:00
parent 8ad0a5fbcf
commit 017f05984e
3 changed files with 28 additions and 8 deletions

View File

@@ -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:

View File

@@ -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::
<artifacts>
<artifact>
<path>path/to/${project.artifactId}-${project.version}.zip</path>
<extraProperties>
<main>true</main>
</extraProperties>
</artifact>
<artifact>
<path>path/to/${project.artifactId}-${project.version}-mac.zip</path>
@@ -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`

View File

@@ -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.