This commit is contained in:
Andres Almiray
2021-05-22 22:55:53 +02:00
parent 518045d8e3
commit 1f59b29281
2 changed files with 90 additions and 16 deletions

View File

@@ -20,6 +20,15 @@ checksum:
# Defaults to `checksums.txt`.
# icon:dot-circle[] icon:file-alt[]
name: '{{projectName}}-{{projectVersion}}_checksums.txt'
# Algorithm to be used.
# Valid values are [`MD2`, `MD5`, `SHA1`, `SHA256`, `SHA384`, `SHA512`, `SHA3-224`, `SHA3-256`, `SHA3-384`, `SHA3-512`].
# Default value is `SHA256`.
# `SHA256` is always configured.
# icon:dot-circle[]
algorithms:
- MD5
- SHA256
# Uploads individual checksum files.
# Defaults to `false`.
@@ -38,6 +47,13 @@ TOML::
# icon:dot-circle[] icon:file-alt[]
name = "{{projectName}}-{{projectVersion}}_checksums.txt"
# Algorithm to be used.
# Valid values are [`MD2`, `MD5`, `SHA1`, `SHA256`, `SHA384`, `SHA512`, `SHA3-224`, `SHA3-256`, `SHA3-384`, `SHA3-512`].
# Default value is `SHA256`.
# `SHA256` is always configured.
# icon:dot-circle[]
algorithms = ["MD5", "SHA256"]
# Uploads individual checksum files.
# Defaults to `false`.
# icon:dot-circle[]
@@ -56,7 +72,17 @@ JSON::
// Defaults to `checksums.txt`.
// icon:dot-circle[] icon:file-alt[]
"name": "{{projectName}}-{{projectVersion}}_checksums.txt",
// Algorithm to be used.
// Valid values are [`MD2`, `MD5`, `SHA1`, `SHA256`, `SHA384`, `SHA512`, `SHA3-224`, `SHA3-256`, `SHA3-384`, `SHA3-512`].
// Default value is `SHA256`.
// `SHA256` is always configured.
// icon:dot-circle[]
"algorithms": [
"MD5",
"SHA256"
],
// Uploads individual checksum files.
// Defaults to `false`.
// icon:dot-circle[]
@@ -82,6 +108,18 @@ Maven::
-->
<name>{{projectName}}-{{projectVersion}}_checksums.txt</name>
<!--
Algorithm to be used.
Valid values are [`MD2`, `MD5`, `SHA1`, `SHA256`, `SHA384`, `SHA512`, `SHA3-224`, `SHA3-256`, `SHA3-384`, `SHA3-512`].
Default value is `SHA256`.
`SHA256` is always configured.
icon:dot-circle[]
-->
<algorithms>
<algorithm>MD5</algorithm>
<algorithm>SHA256</algorithm>
</algorithms>
<!--
Uploads individual checksum files.
Defaults to `false`.
@@ -103,7 +141,15 @@ jreleaser {
// Defaults to `checksums.txt`.
// icon:dot-circle[] icon:file-alt[]
name = '{{projectName}}-{{projectVersion}}_checksums.txt'
// Algorithm to be used.
// Valid values are [`MD2`, `MD5`, `SHA1`, `SHA256`, `SHA384`, `SHA512`, `SHA3-224`, `SHA3-256`, `SHA3-384`, `SHA3-512`].
// Default value is `SHA256`.
// `SHA256` is always configured.
// icon:dot-circle[]
algorithm('MD5')
algorithm('SHA256')
// Uploads individual checksum files.
// Defaults to `false`.
// icon:dot-circle[]

View File

@@ -525,11 +525,11 @@ The following names identify an artifact without explicit `platform`
[%header, cols="<2,<5", width="100%"]
|===
| Key | Description
| artifactUrl | the URL required to download the artifact
| artifactSha256 | the SHA256 checksum of the artifact's file
| artifactFileName | the name of the artifact file
| artifactName | the name of the artifact file without extension
| Key | Description
| artifactUrl | the URL required to download the artifact
| artifactChecksum${SHA} | the matching checksum of the artifact's file, per configured algorithm
| artifactFileName | the name of the artifact file
| artifactName | the name of the artifact file without extension
|===
The following names match the first artifact in a distribution
@@ -538,7 +538,7 @@ The following names match the first artifact in a distribution
|===
| Key | Description
| distributionUrl | the URL required to download the artifact
| distributionSha256 | the SHA256 checksum of the artifact's file
| distributionChecksum${SHA} | the matching checksum of the artifact's file, per configured algorithm
| distributionArtifactFileName | the name of the artifact file
| distributionArtifactName | the name of the artifact file without extension
|===
@@ -547,11 +547,11 @@ Additional names become available when the artifact defines a `platform`
[%header, cols="<2,<5", width="100%"]
|===
| Key | Description
| artifact{{CapitalizedPlatform}}Url | the URL required to download the artifact
| artifact{{CapitalizedPlatform}}Sha256 | the SHA256 checksum of the artifact's file
| artifact{{CapitalizedPlatform}}FileName | the name of the artifact file
| artifact{{CapitalizedPlatform}}Name | the name of the artifact file without extension
| Key | Description
| artifact{{CapitalizedPlatform}}Url | the URL required to download the artifact
| artifact{{CapitalizedPlatform}}Checksum${SHA} | the matching checksum of the artifact's file, per configured algorithm
| artifact{{CapitalizedPlatform}}FileName | the name of the artifact file
| 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
@@ -566,6 +566,11 @@ YAML::
[source,yaml]
[subs="+macros"]
----
checksum:
algorithms:
- MD5
- SHA256
distributions:
app:
artifacts:
@@ -580,6 +585,9 @@ TOML::
[source,toml]
[subs="+macros"]
----
[checksum]
algorithms = ["MD5", "SHA256"]
pass:[[[distributions.app.artifact]]]
path: "path/to/{{distributionName}}-{{projectVersion}}.zip"
extraProperties.main = true
@@ -594,6 +602,13 @@ JSON::
[subs="+macros"]
----
{
"checksums": {
"algorithms": [
"MD5",
"SHA256"
]
},
"distributions": {
"app": {
"artifacts": [
@@ -619,6 +634,12 @@ Maven::
[subs="+macros,verbatim"]
----
<jreleaser>
<checksum>
<algorithms>
<algorithm>MD5</algorithm>
<algorithm>SHA256</algorithm>
</algorithms>
</checksum>
<distributions>
<app>
<artifacts>
@@ -643,6 +664,10 @@ Gradle::
[subs="+macros"]
----
jreleaser {
checksum {
algorithm('MD5')
algorithm('SHA256')
}
distributions {
app {
artifacts {
@@ -666,19 +691,22 @@ The following names will be calculated:
*1st artifact*
* artifactUrl
* artifactSha256
* artifactChecksumMd5
* artifactChecksumSha256
* artifactFileName: `${project.name}-${project.version}.zip`
* artifactName: `${project.name}-${project.version}`
* artifactMain: true
* distributionUrl
* distributionSha256
* distributionChecksummd5
* distributionChecksumSha256
* distributionArtifactFileName: `${project.name}-${project.version}.zip`
* distributionArtifactName: `${project.name}-${project.version}`
*Platform specific artifact*
* artifactOsxUrl
* artifactOsxSha256
* artifactOsxChekcsumMd5
* artifactOsxChekcsumSha256
* artifactOsxFileName: `${project.name}-${project.version}-mac.zip`
* artifactOsxName: `${project.name}-${project.version}-mac`