Skip to content

Commit 92b819c

Browse files
committed
Upgrade grpc references (#442)
1 parent 0c0ec1c commit 92b819c

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

src/Microsoft.Azure.Functions.PowerShellWorker.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ Licensed under the MIT license. See LICENSE file in the project root for full li
2020
</PropertyGroup>
2121

2222
<ItemGroup>
23-
<PackageReference Include="Grpc.Core" Version="1.20.1" />
23+
<PackageReference Include="Grpc.Core" Version="2.27.0" />
2424
<PackageReference Include="Microsoft.PowerShell.SDK" Version="6.2.4" />
2525
<PackageReference Include="CommandLineParser" Version="2.3.0" />
26-
<PackageReference Include="Google.Protobuf" Version="3.7.0" />
26+
<PackageReference Include="Google.Protobuf" Version="3.11.4" />
2727
</ItemGroup>
2828

2929
<ItemGroup>

tools/helper.psm1

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ $RepoRoot = (Resolve-Path "$PSScriptRoot/..").Path
1010
$MinimalSDKVersion = '2.1.805'
1111
$DefaultSDKVersion = '2.1.805'
1212
$LocalDotnetDirPath = if ($IsWindowsEnv) { "$env:LocalAppData\Microsoft\dotnet" } else { "$env:HOME/.dotnet" }
13+
$GrpcToolsVersion = '2.27.0' # grpc.tools
14+
$GoogleProtobufToolsVersion = '3.11.4' # google.protobuf.tools
1315

1416
function Find-Dotnet
1517
{
@@ -150,29 +152,24 @@ function Resolve-ProtoBufToolPath
150152
}
151153

152154
$Script:protoc_Path =
153-
Get-ChildItem "$nugetPath/grpc.tools/*/$protoc_Name" -Recurse |
154-
Where-Object FullName -Like "*$plat_arch_Name*" |
155-
Sort-Object -Property FullName -Descending |
156-
Select-Object -First 1 | ForEach-Object FullName
155+
Resolve-Path "$nugetPath/grpc.tools/$GrpcToolsVersion/tools/$plat_arch_Name/$protoc_Name" |
156+
ForEach-Object Path
157157

158158
if (-not $Script:protoc_Path) {
159159
throw "Couldn't find the executable 'protoc'. Check if the package 'grpc.tools' has been restored."
160160
}
161161

162162
$Script:grpc_csharp_plugin_Path =
163-
Get-ChildItem "$nugetPath/grpc.tools/*/$grpc_csharp_plugin_Name" -Recurse |
164-
Where-Object FullName -Like "*$plat_arch_Name*" |
165-
Sort-Object -Property FullName -Descending |
166-
Select-Object -First 1 | ForEach-Object FullName
163+
Resolve-Path "$nugetPath/grpc.tools/$GrpcToolsVersion/tools/$plat_arch_Name/$grpc_csharp_plugin_Name" |
164+
ForEach-Object Path
167165

168166
if (-not $Script:grpc_csharp_plugin_Path) {
169167
throw "Couldn't find the executable 'grpc_csharp_plugin'. Check if the package 'grpc.tools' has been restored."
170168
}
171169

172170
$Script:google_protobuf_tools_Path =
173-
Get-ChildItem "$nugetPath/google.protobuf.tools/*/tools" |
174-
Sort-Object -Property FullName -Descending |
175-
Select-Object -First 1 | ForEach-Object FullName
171+
Resolve-Path "$nugetPath/google.protobuf.tools/$GoogleProtobufToolsVersion/tools" |
172+
ForEach-Object Path
176173

177174
if (-not $Script:google_protobuf_tools_Path) {
178175
throw "Couldn't find the protobuf tools. Check if the package 'google.protobuf.tools' has been restored."

tools/protobuf.tools.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Licensed under the MIT license. See LICENSE file in the project root for full li
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Grpc.Tools" Version="1.15.0" />
15-
<PackageReference Include="Google.Protobuf.Tools" Version="3.6.1" />
14+
<PackageReference Include="Grpc.Tools" Version="2.27.0" />
15+
<PackageReference Include="Google.Protobuf.Tools" Version="3.11.4" />
1616
</ItemGroup>
1717

1818
</Project>

0 commit comments

Comments
 (0)