mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-09 04:06:27 -04:00
Update scripts to build UWP app
Former-commit-id: 5596142e645370e541ebbf5646f202036e639484 [formerly 428d22fbea0195d4321c561336ba1e07c6e634ac] [formerly 19037ea17c15a19e31828a018b5dfb1d4d97a401] [formerly 5dbf19c0dc663505b01720cf077430ce18be46af [formerly 7309c98b9ef7d5d6553b2b14b48abd0050036f9c [formerly c1cd6d4ce23129e08fb154fe8451644c2e0a9d51]]] Former-commit-id: 99787d54ddd10e96ef35b76e04bd2e1b772de4f4 [formerly eeaf3fd2f248d889f63bdb6e399072314870f258 [formerly 492f45f77bc2256949a55383492a5ef655d518bc]] Former-commit-id: 8a0071708e605c93157035cd04ba55039f72ff63 [formerly 4a7030a9458e26e0bcc6b3feeebe6355da1dd504] Former-commit-id: 144b1664b40d37974abf9f8e07667d0cf9c3f9cb
This commit is contained in:
parent
ee11f098d5
commit
2e22c063b6
1
scripts/Build-UWP.bat
Normal file
1
scripts/Build-UWP.bat
Normal file
@ -0,0 +1 @@
|
||||
cmd.exe /c " "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" && msbuild.exe -p:Configuration=Release "
|
@ -285,6 +285,30 @@ if ($dryrun -or $buildonly -or $release.assets_url -imatch '^https:') {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
# We need assets for the MS Store - check the release has been built
|
||||
$ReleaseBundle = dir "$PSScriptRoot/../AppPackages/*_$base_tag*_Test/*_$base_tag*.appx*"
|
||||
# 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..."
|
||||
$appxmanifest = Get-Content -Raw $PSScriptRoot/../package.appxmanifest
|
||||
if (-Not ($appxmanifest -match "Version=['`"]$numeric_tag\.0['`"]")) {
|
||||
"The requested release version does not match the version in package.appxmanifest"
|
||||
"Updating..."
|
||||
$appxmanifest = $appxmanifest -replace "(Version=['`"])\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"
|
||||
}
|
||||
}
|
||||
if (-Not $dryrun) {
|
||||
cmd.exe /c " `"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat`" && msbuild.exe -p:Configuration=Release"
|
||||
}
|
||||
}
|
||||
# If we are releasing the MS Store version we have to copy it from a different location
|
||||
if ($usestorerelease) {
|
||||
"Using Store release becuase usestorerelease flag was set."
|
||||
@ -314,7 +338,7 @@ if ($dryrun -or $buildonly -or $release.assets_url -imatch '^https:') {
|
||||
return
|
||||
} else {
|
||||
"No package matching that tag was found. Aborting."
|
||||
"Tag yielded $ReleaseBundle"
|
||||
"Tag yielded: $ReleaseBundle"
|
||||
return
|
||||
}
|
||||
# ZIP the remaining assets
|
||||
|
Loading…
x
Reference in New Issue
Block a user