mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-09 12:19:46 -04:00
If there is an existing appxbundle offer to delete
Former-commit-id: d070f48bd36452d22297ae86384998707687d4b3 [formerly d3d8cfb33a269a4d2b7c47b708f397ad9971f0bd [formerly a8d3052ec04793fb890b9c77c89633d71614f0a6 [formerly 86329b2307a0ec865dbda9343de35648a51a15bb]]] Former-commit-id: 369806683ef5027ca7a6569d6accb4bb8e692d64 [formerly 74ea2713464648b6b1f3b9b12e4aa193d1843a57 [formerly 2bf6b91be71e069f09939378a4213819e8ef9cc3]] Former-commit-id: 92675e411ac69bbe1de73dbe6b3852439c63757f [formerly 8b1e0b68420c58cc2701622d510d66cbdd55071e] Former-commit-id: a3a3299ea7544d3e7a22b4a25a9c6391608e0881
This commit is contained in:
parent
743c6f9fa3
commit
f9b4897764
@ -348,31 +348,36 @@ if ($dryrun -or $buildonly -or $release.assets_url -imatch '^https:') {
|
||||
# Check the file exists and it's of the right type
|
||||
if ($ReleaseBundle -and ($ReleaseBundle.count -eq 1) -and (Test-Path $ReleaseBundle -PathType leaf) -and
|
||||
($ReleaseBundle -imatch '\.(?:appx|appxbundle|appxupload)$')) {
|
||||
"`nUWP app packages were found."
|
||||
} else {
|
||||
"`nBuilding UWP app..."
|
||||
if (-Not ($appxmanifest -match "Version=['`"]$numeric_tag\.0['`"]")) {
|
||||
"The requested release version does not match the version in package.appxmanifest"
|
||||
"Updating..."
|
||||
$appxmanifest = $appxmanifest -replace "(\sVersion=['`"])\d+\.\d+\.\d+(\.0['`"])", "`${1}$numeric_tag`${2}"
|
||||
if (-Not $dryrun) {
|
||||
Set-Content $PSScriptRoot/../package.appxmanifest $appxmanifest
|
||||
} else {
|
||||
"[DRYRUN] Would have written package.appxmanifest:"
|
||||
"$appxmanifest"
|
||||
"`nYou should delete this bundle unless you are very sure that it was built with the correct certificate!"
|
||||
$deleteBundle = Read-Host "WARNING: There is already an existing UWP release package! Delete (recommended)? [Y/N]"
|
||||
$deleteBundle = -Not ( $deleteBundle -imatch 'n' )
|
||||
If ($deleteBundle) {
|
||||
rm $ReleaseBundle
|
||||
}
|
||||
}
|
||||
}
|
||||
"`nBuilding UWP app..."
|
||||
if (-Not ($appxmanifest -match "Version=['`"]$numeric_tag\.0['`"]")) {
|
||||
"The requested release version does not match the version in package.appxmanifest"
|
||||
"Updating..."
|
||||
$appxmanifest = $appxmanifest -replace "(\sVersion=['`"])\d+\.\d+\.\d+(\.0['`"])", "`${1}$numeric_tag`${2}"
|
||||
if (-Not $dryrun) {
|
||||
$projstub = $text_tag
|
||||
if ($text_tag -eq "Windows") { $projstub = "" }
|
||||
$buildmode = "SideloadOnly"
|
||||
if ($buildstorerelease) { $buildmode = "StoreUpload" }
|
||||
# We have to rename node_modules or else msbuild won't run due to rogue dependency versions
|
||||
ren $PSScriptRoot/../node_modules node_modules_electron
|
||||
cmd.exe /c " `"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat`" && msbuild.exe KiwixWebApp$projstub.jsproj /p:Configuration=Release /p:UapAppxPackageBuildMode=$buildmode"
|
||||
ren $PSScriptRoot/../node_modules_electron node_modules
|
||||
Set-Content $PSScriptRoot/../package.appxmanifest $appxmanifest
|
||||
} else {
|
||||
"[DRYRUN] Would have written package.appxmanifest:"
|
||||
"$appxmanifest"
|
||||
}
|
||||
}
|
||||
if (-Not $dryrun) {
|
||||
$projstub = $text_tag
|
||||
if ($text_tag -eq "Windows") { $projstub = "" }
|
||||
$buildmode = "SideloadOnly"
|
||||
if ($buildstorerelease) { $buildmode = "StoreUpload" }
|
||||
# We have to rename node_modules or else msbuild won't run due to rogue dependency versions
|
||||
ren $PSScriptRoot/../node_modules node_modules_electron
|
||||
cmd.exe /c " `"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat`" && msbuild.exe KiwixWebApp$projstub.jsproj /p:Configuration=Release /p:UapAppxPackageBuildMode=$buildmode"
|
||||
ren $PSScriptRoot/../node_modules_electron node_modules
|
||||
}
|
||||
|
||||
# If we are releasing the MS Store version we have to copy it from a different location
|
||||
if ($buildstorerelease) {
|
||||
if (-Not ($appxmanifest -match "Publisher=['`"]CN=Association\sKiwix")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user