From bfe291680bf5945b883263b07c3b25c6d6cbe82d Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Mon, 11 Apr 2022 04:25:17 +0100 Subject: [PATCH] Correct build scripts Former-commit-id: ca4a9fb563ab66c8006551442123d45602aa8551 [formerly da3a6b7812200449fc6836a2e255816a36abd4ea] [formerly 9364df4d791f995c1b25148160800268b607b747] [formerly 478a04ed58779c7161f4b75f04066d1dd013e01e [formerly a551e7400359c650b3fe34d31d5fe28b4e3d2a2b [formerly 48e9c02039341300b021f756be5d1b65d8f0c73f]]] Former-commit-id: 59704f52fe06299af68e9862e8eb9b32c3dc7275 [formerly 59b570f1a3ef191b3c731d9c617b543daa7f4d99 [formerly 95ccb992974a26089f27b72b215098a19b98042a]] Former-commit-id: 606cd07b2f2336e543dc1ff0efd9fe0f86109a70 [formerly 72bbb32be173044c1e246850a8b27bee73514d4b] Former-commit-id: a5540e3f9f797afad803b0e5efef219085a82b6a --- scripts/Build-Electron.ps1 | 7 +++++-- scripts/Create-DraftRelease.ps1 | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/Build-Electron.ps1 b/scripts/Build-Electron.ps1 index c2c11c80..a89fbbae 100644 --- a/scripts/Build-Electron.ps1 +++ b/scripts/Build-Electron.ps1 @@ -28,7 +28,10 @@ if ($electronbuild -eq "cloud") { } Body = @{ 'ref' = $branch_name - 'inputs' = @{ 'target' = 'release' } + 'inputs' = @{ + 'target' = 'release' + 'version' = $release_tag_name + } } | ConvertTo-Json ContentType = "application/json" } @@ -159,7 +162,7 @@ if ($electronbuild -eq "local" -and (-not $portableonly)) { } } } -if ($old_windows_support) { +if ($old_windows_support -and ($electronbuild -eq 'local')) { "`nSupport for XP and Vista was requested." "Searching for archives..." $nwjs_base = $PSScriptRoot -ireplace 'kiwix-js-windows.scripts.*$', 'kiwix-js-windows-nwjs' diff --git a/scripts/Create-DraftRelease.ps1 b/scripts/Create-DraftRelease.ps1 index 1cf01260..900ba845 100644 --- a/scripts/Create-DraftRelease.ps1 +++ b/scripts/Create-DraftRelease.ps1 @@ -96,6 +96,7 @@ if ($updatewinget) { } else { "`nCreating release for $tag_name...`n" } +$tag_name = $tag_name -creplace '-E', 'E' $base_tag = $tag_name -creplace '^v([\d.EN]+).*', '$1' $text_tag = $tag_name -creplace '^v[\d.EN+]+-?(.*)$', '$1' $numeric_tag = $base_tag -creplace "([\d.]+)[EN]", '$1'