mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-18 08:47:35 -04:00
Update Build-DockerContainer.ps1
Former-commit-id: faedfc0ab439ca6809e62fbacd6cb3b6df228343 [formerly a94a873950639017fd5e3888246bb5fbf3e6ad99] [formerly 7cdd48914863f325aba66e9efa7063ea99705af9] [formerly 7ecd1c73b5c9a5788eb903cbe6f613a5d02776f0 [formerly f9142f909662d0ccade04efbf50cb7f97ae3b6c3 [formerly 0d929e8a33379d5a1f797dfc1f8031385bd8eb58]]] Former-commit-id: fbc26db16c8b8cd00d6422b5892f0bce4df9aa5a [formerly 38313cfd5891ec67282b48987d9fd7f7672aacd1 [formerly c79f42b0c7128c49be05d0f33e737e180d79ca2f]] Former-commit-id: 98e7feb38abbb7c2497ab9db6d1224fb98f061e4 [formerly 084191973d6db71f3be27e7e480aa0efeb83a02d] Former-commit-id: 52e6de75d91dbb771f279a2cb623fef00240c124
This commit is contained in:
parent
4caf225612
commit
9f23dc2f80
@ -9,8 +9,14 @@ param (
|
||||
$release_uri = 'https://api.github.com/repos/kiwix/kiwix-js-windows/actions/workflows/publish-docker.yaml/dispatches'
|
||||
$github_token = Get-Content -Raw "$PSScriptRoot/github_token"
|
||||
|
||||
$suggested_build = ''
|
||||
if ((sls 'params..version' $PSScriptRoot/../www/js/init.js) -match('"([\d.]+)"')) {
|
||||
$suggested_build = "v" + $matches[1]
|
||||
}
|
||||
|
||||
if ($tag_name -eq "") {
|
||||
$tag_name = Read-Host "`nEnter the existing tag name to use for the manual docker build (e.g. 'v1.4.0')"
|
||||
if (!($tag_name = Read-Host "`nGive the tag name to use for the docker build or Enter to accept default of [$suggested_build]")) { $tag_name = $suggested_build }
|
||||
# $tag_name = Read-Host "`nEnter the existing tag name to use for the manual docker build (e.g. 'v1.4.0')"
|
||||
if (-Not $dryrun) {
|
||||
$dryrun_check = Read-Host "Is this a dry run? [Y/N]"
|
||||
$dryrun = -Not ( $dryrun_check -imatch 'n' )
|
||||
@ -37,13 +43,13 @@ $dispatch_params = @{
|
||||
'inputs' = @{ 'version' = $tag_name }
|
||||
} | ConvertTo-Json
|
||||
ContentType = "application/json"
|
||||
}
|
||||
}
|
||||
|
||||
# Post to the release server
|
||||
if (-Not ($dryrun -or $buildonly -or $updatewinget)) {
|
||||
# Post to the release server
|
||||
if (-Not ($dryrun -or $buildonly -or $updatewinget)) {
|
||||
$dispatch = Invoke-RestMethod @dispatch_params
|
||||
} elseif (-Not $updatewinget) {
|
||||
} elseif (-Not $updatewinget) {
|
||||
"[DRYRUN] Dispatch parameters:`n$dispatch_params`n$tag_name"
|
||||
return
|
||||
}
|
||||
}
|
||||
"`nServer returned:`n$dispatch"
|
||||
|
Loading…
x
Reference in New Issue
Block a user