-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublish.sh
executable file
·56 lines (40 loc) · 1.34 KB
/
publish.sh
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh
if [ $# -eq 0 ]
then
echo "use: nuget-push <api-key> [component]"
echo
echo "example: nuget-push my-secret-api-key core"
echo
exit 1
fi
if [ $# -eq 2 ]
then
# pack and push a single component package
# pack component package
dotnet pack -c release src/$2
# retrieve latest component package
package=`ls -Art src/$2/bin/release/*.nupkg | tail -n 1`
dotnet nuget push -s nuget.org -k $1 $package
else
# pack and push all component packages
# pack core
dotnet pack -c release src/core
# retrieve latest core package
package=`ls -Art src/core/bin/release/*.nupkg | tail -n 1`
dotnet nuget push -s nuget.org -k $1 $package
# pack buffers
dotnet pack -c release src/buffers
# retrieve latest buffers package
package=`ls -Art src/buffers/bin/release/*.nupkg | tail -n 1`
dotnet nuget push -s nuget.org -k $1 $package
# pack channels
dotnet pack -c release src/channels
# retrieve latest channels package
package=`ls -Art src/channels/bin/release/*.nupkg | tail -n 1`
dotnet nuget push -s nuget.org -k $1 $package
# pack websockets
dotnet pack -c release src/websockets
# retrieve latest websockets package
package=`ls -Art src/websockets/bin/release/*.nupkg | tail -n 1`
dotnet nuget push -s nuget.org -k $1 $package
fi