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' : ''}")
|
from("src/main/deploy/package/linux${headless ? '-headless' : ''}")
|
||||||
into(layout.buildDirectory.dir('deploy/package'))
|
into(layout.buildDirectory.dir('deploy/package'))
|
||||||
include('*')
|
include('*')
|
||||||
exclude('*.png')
|
eachFile { file ->
|
||||||
filter { String line ->
|
if(file.name.equals('control') || file.name.endsWith('.spec')) {
|
||||||
if(line.contains('${size')) {
|
filter { line ->
|
||||||
|
if(line.contains('${size}')) {
|
||||||
line = line.replace('${size}', getDirectorySize(layout.buildDirectory.dir('jpackage/Sparrow').get().asFile))
|
line = line.replace('${size}', getDirectorySize(layout.buildDirectory.dir('jpackage/Sparrow').get().asFile))
|
||||||
}
|
}
|
||||||
return line.replace('${version}', "${version}").replace('${arch}', osArch == 'aarch64' ? 'arm64' : 'amd64')
|
return line.replace('${version}', "${version}").replace('${arch}', osArch == 'aarch64' ? 'arm64' : 'amd64')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static def getDirectorySize(File directory) {
|
static def getDirectorySize(File directory) {
|
||||||
long size = 0
|
long size = 0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue