forked from wallee-payment/csharp-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
35 lines (29 loc) · 1.04 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
#!/usr/bin/env bash
frameworkVersion=net45
netfx=${frameworkVersion#net}
echo "[INFO] Target framework: ${frameworkVersion}"
echo "[INFO] Download nuget and packages"
wget -nc https://dist.nuget.org/win-x86-commandline/v4.1.0/nuget.exe;
mozroots --import --sync
mono nuget.exe install src/Customweb.Wallee/packages.config -o packages;
echo "[INFO] Copy DLLs to the 'bin' folder"
mkdir -p bin;
cp packages/Newtonsoft.Json.9.0.1/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
cp packages/RestSharp.105.2.3/lib/net45/RestSharp.dll bin/RestSharp.dll;
echo "[INFO] Run 'mcs' to build bin/Customweb.Wallee.dll"
mcs -sdk:${netfx} -r:bin/Newtonsoft.Json.dll,\
bin/RestSharp.dll,\
System.ComponentModel.DataAnnotations.dll,\
System.Runtime.Serialization.dll \
-target:library \
-out:bin/Customweb.Wallee.dll \
-recurse:'src/Customweb.Wallee/*.cs' \
-doc:bin/Customweb.Wallee.xml \
-platform:anycpu
if [ $? -ne 0 ]
then
echo "[ERROR] Compilation failed with exit code $?"
exit 1
else
echo "[INFO] bin/Customweb.Wallee.dll was created successfully"
fi