mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-11 13:18:21 -04:00
Fix release tag name
Former-commit-id: ace2d32c2edd5c9a48a87f68bb0bf5ef40c75c6b [formerly a2453ecf65c4825c7edff0fbbe7dbe06826a01ff] [formerly 39c9233a8df47b70affc380e10ca2500d83b844f] [formerly e46cbda6b6e5b3a5bfa3e27b57f794b7d72a2825 [formerly 6c14d2957f457b62955867c23810b8ef614ea7e8 [formerly 00c9e6163953f21e2f5b730baafcd11c71db6f1b]]] Former-commit-id: bf99b497445e4a9c5f1b8b2eb67f27de46d49ea0 [formerly b0e1fca0d69155d85e107a239390db29c2557889 [formerly d1c11f50ac64557ad68d761f05475c5bd64ef83e]] Former-commit-id: 8824a0ee5acce4f52ac680eaf6c4ee3365bcc02a [formerly ec60c8e258891f37d94f179b8982171962a46300] Former-commit-id: 375d8543b756b87f7c4240d283a14bcc09a57831
This commit is contained in:
parent
b99d8635ab
commit
3ea549e6f4
@ -57,7 +57,7 @@ if ($tag_name -NotMatch '^v\d+\.\d+\.\d+([EN-]|$)') {
|
|||||||
if ($updatewinget) {
|
if ($updatewinget) {
|
||||||
"`nUpdating winget repository only..."
|
"`nUpdating winget repository only..."
|
||||||
} else {
|
} else {
|
||||||
"`nCreating release for $tag_name..."
|
"`nCreating release for $tag_name...`n"
|
||||||
}
|
}
|
||||||
$base_tag = $tag_name -replace '^v([\d.EN]+).*', '$1'
|
$base_tag = $tag_name -replace '^v([\d.EN]+).*', '$1'
|
||||||
$text_tag = $tag_name -replace '^v[\d.EN+]+-?(.*)$', '$1'
|
$text_tag = $tag_name -replace '^v[\d.EN+]+-?(.*)$', '$1'
|
||||||
@ -81,6 +81,12 @@ if ($file_version) {
|
|||||||
"Zim: $zim"
|
"Zim: $zim"
|
||||||
"Date: $date"
|
"Date: $date"
|
||||||
$branch = "master"
|
$branch = "master"
|
||||||
|
$release_tag_name = $tag_name
|
||||||
|
if ($tag_name -match 'E\+N') {
|
||||||
|
$title_flavour = 'Electron and NWJS'
|
||||||
|
$release_title = $release_title -replace 'Windows\s', ''
|
||||||
|
$release_tag_name = $tag_name -replace '\+N', ''
|
||||||
|
}
|
||||||
if ($text_tag -ne "Windows") { $branch = "Kiwix-JS-$text_tag" }
|
if ($text_tag -ne "Windows") { $branch = "Kiwix-JS-$text_tag" }
|
||||||
if ($base_tag -match '[EN]$') {
|
if ($base_tag -match '[EN]$') {
|
||||||
$flavour = '_' + $matches[0]
|
$flavour = '_' + $matches[0]
|
||||||
@ -89,10 +95,6 @@ if ($base_tag -match '[EN]$') {
|
|||||||
$title_flavour = 'NWJS'
|
$title_flavour = 'NWJS'
|
||||||
$branch = 'nwjs-en-top'
|
$branch = 'nwjs-en-top'
|
||||||
}
|
}
|
||||||
if ($tag_name -match 'E\+N') {
|
|
||||||
$title_flavour = 'Electron and NWJS'
|
|
||||||
$release_title = $release_title -replace 'Windows\s', ''
|
|
||||||
}
|
|
||||||
$release_title = $release_title -replace '([^\s]+)\sUWP$', ("$title_flavour (Windows/Linux) " + '$1')
|
$release_title = $release_title -replace '([^\s]+)\sUWP$', ("$title_flavour (Windows/Linux) " + '$1')
|
||||||
if ($flavour -eq '_N') { $release_title = $release_title -replace 'Edition\s(for\s)', '$1XP/Vista/' }
|
if ($flavour -eq '_N') { $release_title = $release_title -replace 'Edition\s(for\s)', '$1XP/Vista/' }
|
||||||
}
|
}
|
||||||
@ -102,6 +104,8 @@ $package_name = ''
|
|||||||
if ($json_object -imatch '"name":\s"([\w]+-[^"]+)') {
|
if ($json_object -imatch '"name":\s"([\w]+-[^"]+)') {
|
||||||
$package_name = $matches[1]
|
$package_name = $matches[1]
|
||||||
}
|
}
|
||||||
|
"Tag name: $tag_name"
|
||||||
|
"Release tag name: $release_tag_name"
|
||||||
"Text tag: $text_tag"
|
"Text tag: $text_tag"
|
||||||
"Base tag: $base_tag"
|
"Base tag: $base_tag"
|
||||||
"Numeric tag: $numeric_tag"
|
"Numeric tag: $numeric_tag"
|
||||||
@ -115,7 +119,7 @@ $release_body = $release_body -replace '<<zim>>', "$zim"
|
|||||||
$release_body = $release_body -replace '<<date>>', "$date"
|
$release_body = $release_body -replace '<<date>>', "$date"
|
||||||
# Set up release_params object - for API see https://docs.github.com/en/rest/reference/repos#releases
|
# Set up release_params object - for API see https://docs.github.com/en/rest/reference/repos#releases
|
||||||
$release_body_json = @{
|
$release_body_json = @{
|
||||||
'tag_name' = "v$base_tag"
|
'tag_name' = "$release_tag_name"
|
||||||
'target_commitish' = $branch
|
'target_commitish' = $branch
|
||||||
'name' = $release_title
|
'name' = $release_title
|
||||||
'draft' = $true
|
'draft' = $true
|
||||||
@ -553,9 +557,9 @@ if ($dryrun -or $buildonly -or $release.assets_url -imatch '^https:') {
|
|||||||
cd $PSScriptRoot\..
|
cd $PSScriptRoot\..
|
||||||
pwd
|
pwd
|
||||||
if (-Not $dryrun) {
|
if (-Not $dryrun) {
|
||||||
& .\scripts\Create-DraftRelease.ps1 -updatewinget -tag_name $tag_name
|
& .\scripts\Create-DraftRelease.ps1 -updatewinget -tag_name $release_tag_name
|
||||||
} else {
|
} else {
|
||||||
"[DRYRUN:] & .\scripts\Create-DraftRelease.ps1 -updatewinget -tag_name $tag_name"
|
"[DRYRUN:] & .\scripts\Create-DraftRelease.ps1 -updatewinget -tag_name $release_tag_name"
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
"You can update the WinGet repository manually by running 'Create-DraftRelease -updatewinget'"
|
"You can update the WinGet repository manually by running 'Create-DraftRelease -updatewinget'"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user