mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-14 14:58:35 -04:00
Make Set-AppVersion auto-increment version
Former-commit-id: bf24b2787577b6b16a5d199365dbc6100cf1026e Former-commit-id: 6bdde8982bf424d78742ccbf417c12466ca52ae2
This commit is contained in:
parent
0e4d8aee47
commit
b0d7c404a0
@ -14,6 +14,14 @@ if ($customversion) {
|
|||||||
if ($init_params -match 'params\[[''"]appVersion[''"]]\s*=\s*[''"]([^''"]+)') {
|
if ($init_params -match 'params\[[''"]appVersion[''"]]\s*=\s*[''"]([^''"]+)') {
|
||||||
$file_tag = 'v' + $matches[1]
|
$file_tag = 'v' + $matches[1]
|
||||||
}
|
}
|
||||||
|
if ($file_tag) {
|
||||||
|
"`nCurrent app version is: $file_tag"
|
||||||
|
if ($file_tag -match '(^.*\.)([0-9]+)(.*$)') {
|
||||||
|
if ($matches[2]) {
|
||||||
|
$file_tag = $matches[1] + ($matches[2] / 1 + 1) + $matches[3]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
$tag_name = Read-Host "`nEnter the tag name for this release, Enter to accept suggested tag [$file_tag]"
|
$tag_name = Read-Host "`nEnter the tag name for this release, Enter to accept suggested tag [$file_tag]"
|
||||||
if ($tag_name -eq "") { $tag_name = $file_tag }
|
if ($tag_name -eq "") { $tag_name = $file_tag }
|
||||||
if ($tag_name -NotMatch '^v\d+\.\d+\.\d+([+EN-]|$)') {
|
if ($tag_name -NotMatch '^v\d+\.\d+\.\d+([+EN-]|$)') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user