-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sh
executable file
·39 lines (28 loc) · 1.44 KB
/
build.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
#!/bin/sh
BASEDIR=$(dirname "$0")
VERSION=`cat $BASEDIR/Core.sln | grep version | tail -c 7 | rev | cut -c 2- | rev`
dotnet publish -c Release -r win-x86 --self-contained true /p:PublishSingleFile=true
dotnet publish -c Release -r win-x64 --self-contained true /p:PublishSingleFile=true
dotnet publish -c Release -r osx-x64 --self-contained true /p:PublishSingleFile=true
dotnet restore
# win-x86
cd $BASEDIR/Core/bin/Release/netcoreapp3.0/win-x86
rm -r 'sharpcoin-core-v'"$VERSION"'_win-x86'
rm 'sharpcoin-core-v'"$VERSION"'_win-x86.zip'
mv publish 'sharpcoin-core-v'"$VERSION"'_win-x86'
zip -r 'sharpcoin-core-v'"$VERSION"'_win-x86.zip' 'sharpcoin-core-v'"$VERSION"'_win-x86'
mv 'sharpcoin-core-v'"$VERSION"'_win-x86.zip' '../sharpcoin-core-v'"$VERSION"'_win-x86.zip'
# win-x64
cd ../win-x64
rm -r 'sharpcoin-core-v'"$VERSION"'_win-x64'
rm 'sharpcoin-core-v'"$VERSION"'_win-x64.zip'
mv publish 'sharpcoin-core-v'"$VERSION"'_win-x64'
zip -r 'sharpcoin-core-v'"$VERSION"'_win-x64.zip' 'sharpcoin-core-v'"$VERSION"'_win-x64'
mv 'sharpcoin-core-v'"$VERSION"'_win-x64.zip' '../sharpcoin-core-v'"$VERSION"'_win-x64.zip'
# osx-x64
cd ../osx-x64
rm -r 'sharpcoin-core-v'"$VERSION"'_osx-x64'
rm 'sharpcoin-core-v'"$VERSION"'_osx-x64.zip'
mv publish 'sharpcoin-core-v'"$VERSION"'_osx-x64'
zip -r 'sharpcoin-core-v'"$VERSION"'_osx-x64.zip' 'sharpcoin-core-v'"$VERSION"'_osx-x64'
mv 'sharpcoin-core-v'"$VERSION"'_osx-x64.zip' '../sharpcoin-core-v'"$VERSION"'_osx-x64.zip'