Add NuGet package tools

This commit is contained in:
Davipb authored and Lukas Dürrenberger committed 2019-01-23 22:59:18 +01:00
1 parent 61f17e3c1d
commit d8e19e74ed
14 files changed
+680

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
#!/bin/sh
# Automatically exit on error
set -e
if [ -z "$1" ]; then
echo "Specify the NuGet API Key as a parameter to this script"
exit 1
fi
dotnet build -c Release
# Find every file that matches the glob ./*/bin/Release/*.nupkg
# and push it to nuget.org using the key specified as a parameter
# to this script
find \
-type f \
-regex "\./\w+/bin/Release/[^/]+\.nupkg" \
-exec dotnet nuget push -k "$1" -s "https://api.nuget.org/v3/index.json" "{}" ";"