-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-to-nuget.sh
More file actions
30 lines (24 loc) · 806 Bytes
/
Copy pathdeploy-to-nuget.sh
File metadata and controls
30 lines (24 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
if [ -z $1 ]; then
echo "The Nuget API Key was not set (first parameter)."
exit 1
else
echo "The Nuget API Key was set."
fi
SOURCE=$2
if [ -z "$SOURCE" ]
echo "Working with provided Nuget Source '$SOURCE'."
then
SOURCE="https://api.nuget.org/v3/index.json"
echo "Working with default Nuget Source '$SOURCE'."
echo "Use the second command line argument to set the source if you like to set override the default."
fi
# Cleaning dotnet build output
dotnet clean --configuration Release
# Removing previous packages
rm src/Validations/bin/Release/Triplex.Validations*.nupkg
# Building and creating packages
dotnet build --configuration Release
# Move to packages root and issue publish command
cd src/Validations/bin/Release
dotnet nuget push *.nupkg -k $1 -s $SOURCE