blob: 56fad6a92c395ad942dc9ea9ce2c9bdc6b7de395 (
plain)
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
|
#!/bin/bash
set -e
if ! command -v docker; then
printf "%s\n" "[err] docker not found"
exit 1
fi
docker run --rm -it -v $(pwd):/mnt mono:latest bash -c '
DEBIAN_FRONTEND=noninteractive apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y git zip
git config --global --add safe.directory /mnt
cd /mnt
mkdir -p build
REPO_NAME=$(basename $(git remote get-url origin))
REPO_NAME="${REPO_NAME%.git}"
nuget restore SharpAMSIGhosting.sln
msbuild SharpAMSIGhosting.sln /p:Configuration=Release /p:Platform="Any CPU"
msbuild SharpAMSIGhosting.sln /p:Configuration=Release /p:Platform=x64
msbuild SharpAMSIGhosting.sln /p:Configuration=Release /p:Platform=x86
mv SharpAMSIGhosting/bin/Release/SharpAMSIGhosting.exe build/SharpAMSIGhosting-AnyCPU.exe
mv SharpAMSIGhosting/bin/x64/Release/SharpAMSIGhosting.exe build/SharpAMSIGhosting-x64.exe
mv SharpAMSIGhosting/bin/x86/Release/SharpAMSIGhosting.exe build/SharpAMSIGhosting-x86.exe
zip -r "${REPO_NAME}-release.zip" LICENSE README.md build/
rm -rf SharpAMSIGhosting/bin SharpAMSIGhosting/obj
rm -rf build
'
printf "%s\n" "[inf] finished building ${repo_name}"
|