Skip to content

Commit

Permalink
packaging: Copy maintainer public keys to release directory
Browse files Browse the repository at this point in the history
  • Loading branch information
alvasw committed Jun 24, 2024
1 parent 7ccb203 commit 3967a54
Show file tree
Hide file tree
Showing 4 changed files with 135 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBGNRef4BEAClC9boA6cdHohUN10kDtJxmYYvbLkv3deMhAAbQUf92Pa2xUR9
WNLd7VTTnyZTG5Mns5uul5BLma1kO2kifXNPLofongTTBWN1n+s4IL4vn18h6wMH
vplg76WkgkwDaj7+xJ4KFLY4J80lLnFG57gTkztYkslOR348rZmS7Qk+i0j+est1
MFaFIlDNF+ecNkOOQQhooleFtlkxin3tsJvOwMY9umcTPJ5TJhiTrfsfzrV+0Y/K
Pu5h79vjymNy1pwVx0+ZnvkQwkZ6yVmeP5fVR1TYTT0pObKBTvdMFPo9wDENZByT
1RksCGjHzI5+Cv+mg0kQS7VzFbBP7gYR9qthTq+slhDSHjnUJhxMndBPqsBvCCAE
X31EpivNR97g3B6GAYjEhQkSTksWAKh6hbNiWEnYBKhePinMnoQriWGN0cshL6HB
p+tBp1ESpyY3/jEMfcdVmhv8Fg/8KMGlvT58/7AfoH0oye7hyoWUu1XxmTWcbr1S
eVZrOt32t1tcFQBjDW+1POiUwjOtXQZAZ6Otn2P+zKNkGfelb9YUqLZnFs6C2PEw
ST14hQZ1vQqWX3m8y9W8t6PY3zTmar5ImWccCXbK3GC4d7B5JIJZh3KQsxocv0NB
lkonKTOlmOjWJ22gEnUHQUQmwgb3S3NKnJFJ951FCsWdZZyIQW+IgTAhOwARAQAB
tCNIZW5yaWtKYW5uc2VuIDxib2lsaW5nZnJvZ0BnbXguY29tPokCVAQTAQoAPhYh
BLil0hSt+qOHoUyLzwKqK644fIMHBQJjUXn+AhsDBQkHhh8+BQsJCAcDBRUKCQgL
BRYCAwEAAh4BAheAAAoJEAKqK644fIMHc+wP/0nSdSv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UnqLQIJ/yI3fXUCXnd
=ektd
-----END PGP PUBLIC KEY BLOCK-----
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ class PackagingPlugin @Inject constructor(private val javaToolchainService: Java
outputDirectory.set(project.layout.buildDirectory.dir("packaging/jpackage/packages"))
}

ReleaseBinariesTaskFactory.registerCopyReleaseBinariesTask(project)
val releaseBinariesTaskFactory = ReleaseBinariesTaskFactory(project)
releaseBinariesTaskFactory.registerCopyReleaseBinariesTask()
releaseBinariesTaskFactory.registerCopyMaintainerPublicKeysTask()
}

private fun getHashFileForOs(project: Project): Provider<RegularFile> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,36 @@ import org.gradle.api.provider.Provider
import org.gradle.api.tasks.Copy
import org.gradle.kotlin.dsl.register

class ReleaseBinariesTaskFactory {
companion object {
fun registerCopyReleaseBinariesTask(project: Project) {
val inputBinariesProperty: Provider<String> = project.providers
.gradleProperty("bisq.release.binaries_path")
val releaseDir: Provider<Directory> = project.layout.buildDirectory.dir("packaging/release")
class ReleaseBinariesTaskFactory(private val project: Project) {
private val releaseDir: Provider<Directory> = project.layout.buildDirectory.dir("packaging/release")

project.tasks.register<Copy>("copyReleaseBinaries") {
from(inputBinariesProperty)
into(releaseDir)
rename { fileName: String ->
fileName.replace("Bisq 2", "Bisq") // "Bisq 2-2.0.4.exe", "Bisq 2-2.0.4.dmg"
.replace("bisq2_", "Bisq-") // "bisq2_2.0.4-1_amd64.deb"
.replace("bisq2-", "Bisq-") // "bisq2-2.0.4-1.x86_64.rpm"
.replace("-1_amd64", "")
.replace("-1.x86_64", "")
}
fun registerCopyReleaseBinariesTask() {
val inputBinariesProperty: Provider<String> = project.providers
.gradleProperty("bisq.release.binaries_path")
val releaseDir: Provider<Directory> = project.layout.buildDirectory.dir("packaging/release")

project.tasks.register<Copy>("copyReleaseBinaries") {
from(inputBinariesProperty)
into(releaseDir)
rename { fileName: String ->
fileName.replace("Bisq 2", "Bisq") // "Bisq 2-2.0.4.exe", "Bisq 2-2.0.4.dmg"
.replace("bisq2_", "Bisq-") // "bisq2_2.0.4-1_amd64.deb"
.replace("bisq2-", "Bisq-") // "bisq2-2.0.4-1.x86_64.rpm"
.replace("-1_amd64", "")
.replace("-1.x86_64", "")
}
}
}

fun registerCopyMaintainerPublicKeysTask() {
val publicKeyDirectory = "maintainer_public_keys"
val maintainerPublicKeys = project.layout.files(
"$publicKeyDirectory/387C8307.asc",
"$publicKeyDirectory/E222AA02.asc"
)
project.tasks.register<Copy>("copyMaintainerPublicKeys") {
from(maintainerPublicKeys)
into(releaseDir)
}
}
}

0 comments on commit 3967a54

Please sign in to comment.