-
Notifications
You must be signed in to change notification settings - Fork 1
/
make.sh
37 lines (26 loc) · 1.1 KB
/
make.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
#!/bin/bash
dotnet publish --disable-parallel --ignore-failed-sources --configuration Release --output ./bin/Release/ Zetbox.Core.sln
dotnet publish --disable-parallel --ignore-failed-sources --configuration Release --output ./bin/Release/HttpService Zetbox.Server.HttpService/Zetbox.Server.HttpService.csproj
cp -r ./bin/Release/Common ./bin/Release/HttpService
cp -r ./bin/Release/Server ./bin/Release/HttpService
cp -r ./Configs ./bin/Release
version="$(gitversion -nofetch -showvariable NuGetVersionV2)"
echo "Version = $version"
echo "@nuget install ZetboxBasic -Version $version -OutputDirectory \"%~dp0\bin\"" > publish/DownloadZetbox.cmd
# publish
rm publish/*.nupkg || true
rm publish/*.nuspec || true
cp publish/* ./bin/Release
echo ""
echo "Converting files"
for f in publish/*.nuspec.template; do
baseName=`echo $f | cut -d "." -f 1`
newExtension=".new"
cp -f $f $baseName.nuspec
sed -i "s/##version##/$version/g" $baseName.nuspec
done
cp ./publish/*.nuspec ./bin/Release
echo "packing files"
for f in ./bin/Release/*.nuspec; do
nuget pack -NoPackageAnalysis $f -OutputDirectory ./publish/
done