antlr/build/push.ps1

30 lines
754 B
PowerShell
Raw Normal View History

2014-03-26 03:48:45 +08:00
. .\version.ps1
2014-03-26 03:48:45 +08:00
If ($AntlrVersion.EndsWith('-dev')) {
2014-08-16 23:10:01 +08:00
$host.ui.WriteErrorLine("Cannot push development version '$AntlrVersion' to NuGet.")
2014-03-26 03:48:45 +08:00
Exit 1
}
$packages = @(
'Antlr4.Runtime'
'Antlr4'
'Antlr4.VS2008')
# Make sure all packages exist before pushing any packages
ForEach ($package in $packages) {
If (-not (Test-Path ".\nuget\$package.$AntlrVersion.nupkg")) {
$host.ui.WriteErrorLine("Couldn't locate NuGet package: $JarPath")
exit 1
}
If (-not (Test-Path ".\nuget\$package.$AntlrVersion.symbols.nupkg")) {
$host.ui.WriteErrorLine("Couldn't locate NuGet symbols package: $JarPath")
exit 1
}
}
$nuget = '..\runtime\CSharp\.nuget\NuGet.exe'
ForEach ($package in $packages) {
&$nuget 'push' ".\nuget\$package.$AntlrVersion.nupkg"
}