2014-03-26 03:48:45 +08:00
|
|
|
. .\version.ps1
|
2014-02-19 07:40:31 +08:00
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2014-08-16 23:08:41 +08:00
|
|
|
$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"
|
|
|
|
}
|