mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-09 04:06:27 -04:00
Make sure Create-DraftRelease can cope with missing archive
This commit is contained in:
parent
29f1facd35
commit
92199fb9db
@ -504,6 +504,10 @@ if ($dryrun -or $buildonly -or $release.assets_url -imatch '^https:') {
|
||||
}
|
||||
# Check for the existence of the requested packaged archive
|
||||
$packagedFile = (Select-String 'packagedFile' "dist\www\js\init.js" -List) -ireplace "^.+['`"]([^'`"]+\.zim)['`"].+", '$1'
|
||||
# If $packagedFile doesn't match a ZIM, make sure it is empty
|
||||
if ($packagedFile -and -not ($packagedFile -imatch '\.zim$')) {
|
||||
$packagedFile = ''
|
||||
}
|
||||
if ($packagedFile -and ! (Test-Path "dist\archives\$packagedFile" -PathType Leaf)) {
|
||||
# File not in archives
|
||||
$downloadArchiveChk = Read-Host "`nWe could not find the packaged archive, do you wish to download it? Y/N"
|
||||
|
Loading…
x
Reference in New Issue
Block a user