Dmitry Kirdyashkin 2023-05-19 12:51:55 +03:00
parent f01b0fc2ce
commit 25b9ea97f0
1 changed files with 2 additions and 0 deletions

View File

@ -66,7 +66,9 @@ function New-Archive {
#загрузка архива
Write-Host -ForegroundColor Cyan "`nUploading archive..."
curl.exe --user owner:5ehfv3fbj8 --upload-file $localFolder\$moduleName\$archiveName $uploadPath/$archiveName --upload-file $localFolder\$moduleName\module.json $uploadPath/module.json
curl -v --user owner:5ehfv3fbj8 -X 'POST' 'https://nexus.kdiva.ru/service/rest/v1/repositories/generic/rebuild-index' -H 'accept: application/json'
Start-Sleep -Seconds 2
#проверка и удаление архива
$response = Invoke-RestMethod -Method Get -Uri 'https://nexus.kdiva.ru/service/rest/v1/search?repository=generic'
if ($archiveName -in (Split-Path($response.items.name) -Leaf)){