-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpack-publish-nuget.sh
More file actions
executable file
·45 lines (39 loc) · 1.04 KB
/
pack-publish-nuget.sh
File metadata and controls
executable file
·45 lines (39 loc) · 1.04 KB
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
#!/bin/bash
declare build_dir=`pwd`
build_nuget_cwd() {
if [ -f *.nuspec ]; then
mono ${build_dir}/.nuget/nuget.exe pack -OutputDirectory bin/publish -prop Configuration=$3 -prop VersionNumber=$1
elif [ -f *.csproj ]; then
dotnet pack --no-build --configuration $3 --output bin/publish /p:VersionNumber=$1
fi
if [ -d ./bin/publish ]; then
for N in ./bin/publish/*.nupkg; do
dotnet nuget push --no-symbols -s $4/v3/index.json -k `cat $2` ${N} &
done
#for N in ./bin/publish/*.snupkg; do
# dotnet nuget push -s $4/v3/index.json -k `cat $2` ${N} &
#done
fi
}
if (( $# < 4 ))
then
echo "Use: pack-publish-nuget.sh VERSION_ID API_FILE CONFIGURATION SERVER"
exit -1;
fi;
for S in *; do
if [ -d "${S}" ]; then
echo "Entering ${S}"
cd "${S}"
build_nuget_cwd $1 $2 $3 $4
for D in *; do
if [ -d "${D}" ]; then
cd "${D}"
build_nuget_cwd $1 $2 $3 $4
cd ..
fi
done
cd ..
fi
done
echo "Waiting for packaging to finish"
wait