Skip to content

Commit

Permalink
Merge branch 'release/misc'
Browse files Browse the repository at this point in the history
  • Loading branch information
takuya-takeuchi committed Mar 13, 2021
2 parents 75658ae + 2ee97d1 commit 9c37470
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 6 deletions.
File renamed without changes.
6 changes: 0 additions & 6 deletions nuget/Publish.bat

This file was deleted.

46 changes: 46 additions & 0 deletions nuget/Publish.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#***************************************
#Arguments
#%1: Version of Release (1.2.3.0)
#***************************************
Param([Parameter(
Mandatory=$True,
Position = 1
)][string]
$Version
)

$PublishTargets = ( "FaceRecognitionDotNet",
"FaceRecognitionDotNet.CUDA92",
"FaceRecognitionDotNet.CUDA100",
"FaceRecognitionDotNet.CUDA101",
"FaceRecognitionDotNet.CUDA102",
"FaceRecognitionDotNet.CUDA110",
"FaceRecognitionDotNet.CUDA111",
"FaceRecognitionDotNet.CUDA112",
"FaceRecognitionDotNet.MKL"
)

$Token = $env:FaceRecognitionDotNetNugetToken
if ([string]::IsNullOrWhitespace($Token))
{
Write-Host "nuget token is missing" -ForegroundColor Red
exit
}

# Precheck whether all package is present
foreach ($Target in $PublishTargets)
{
$Package = Join-Path $PSScriptRoot "${Target}.${Version}.nupkg"
if (!(Test-Path ${Package}))
{
Write-Host "${Package} is missing" -ForegroundColor Red
exit
}
}

foreach ($Target in $PublishTargets)
{
$Package = Join-Path $PSScriptRoot "${Target}.${Version}.nupkg"
Write-Host "Publish ${Package}" -ForegroundColor Green
dotnet nuget push ${Package} -k $Token -s https://api.nuget.org/v3/index.json
}

0 comments on commit 9c37470

Please sign in to comment.