aboutsummaryrefslogtreecommitdiff
path: root/build.sh
blob: dac3ecf8291afffc9faa3aa7ffe3cdd0caeee8db (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
#!/bin/bash
set -e

if ! command -v docker; then
    printf "%s\n" "[err] docker not found"
    exit 1
fi

repo_name=$( basename -s .git $(git remote get-url origin) )

docker run --rm -it -v $(pwd):/app -w /app mono:latest bash -c '
  set -e
  mkdir -p build

  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

  cp SharpAMSIGhosting/bin/Release/SharpAMSIGhosting.exe build/SharpAMSIGhosting-AnyCPU.exe
  cp SharpAMSIGhosting/bin/x64/Release/SharpAMSIGhosting.exe build/SharpAMSIGhosting-x64.exe
  cp SharpAMSIGhosting/bin/x86/Release/SharpAMSIGhosting.exe build/SharpAMSIGhosting-x86.exe
'

printf "%s\n" "[inf] finished building ${repo_name}"