mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2025-11-05 11:56:37 +00:00
followup
This commit is contained in:
parent
d0da85171c
commit
055e3ac496
1 changed files with 8 additions and 5 deletions
|
|
@ -296,14 +296,17 @@ tasks.register('prepareResourceDir', Copy) {
|
|||
from("src/main/deploy/package/linux${headless ? '-headless' : ''}")
|
||||
into(layout.buildDirectory.dir('deploy/package'))
|
||||
include('*')
|
||||
exclude('*.png')
|
||||
filter { String line ->
|
||||
if(line.contains('${size')) {
|
||||
eachFile { file ->
|
||||
if(file.name.equals('control') || file.name.endsWith('.spec')) {
|
||||
filter { line ->
|
||||
if(line.contains('${size}')) {
|
||||
line = line.replace('${size}', getDirectorySize(layout.buildDirectory.dir('jpackage/Sparrow').get().asFile))
|
||||
}
|
||||
return line.replace('${version}', "${version}").replace('${arch}', osArch == 'aarch64' ? 'arm64' : 'amd64')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static def getDirectorySize(File directory) {
|
||||
long size = 0
|
||||
|
|
|
|||
Loading…
Reference in a new issue