aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/distrib/csharp/update_version.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/distrib/csharp/update_version.sh')
-rwxr-xr-xtest/distrib/csharp/update_version.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/distrib/csharp/update_version.sh b/test/distrib/csharp/update_version.sh
index 189d0ad357..2961d0c5ef 100755
--- a/test/distrib/csharp/update_version.sh
+++ b/test/distrib/csharp/update_version.sh
@@ -35,10 +35,10 @@ cd $(dirname $0)
CSHARP_VERSION="$1"
if [ "$CSHARP_VERSION" == "auto" ]
then
- # autodetect C# version
- CSHARP_VERSION=$(ls TestNugetFeed | grep '^Grpc\.[0-9].*\.nupkg$' | sed s/^Grpc\.// | sed s/\.nupkg$//)
+ # autodetect C# version from the name of Grpc.Core.0.0.0-x.nupkg file
+ CSHARP_VERSION=$(ls TestNugetFeed | grep -m 1 '^Grpc\.Core\.[0-9].*\.nupkg$' | sed s/^Grpc\.Core\.// | sed s/\.nupkg$// | sed s/\.symbols$//)
echo "Autodetected nuget ${CSHARP_VERSION}"
fi
# Replaces version placeholder with value provided as first argument.
-sed -ibak "s/__GRPC_NUGET_VERSION__/${CSHARP_VERSION}/g" DistribTest/packages.config DistribTest/DistribTest.csproj
+sed -ibak "s/__GRPC_NUGET_VERSION__/${CSHARP_VERSION}/g" DistribTest/packages.config DistribTest/DistribTest.csproj DistribTest/project.json