forked from eclipsesource/J2V8
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy_snapshots.sh
86 lines (79 loc) · 2.37 KB
/
deploy_snapshots.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
SUFFIX="-P release"
#SUFFIX=""
cp pom.xml pom_template.xml
echo "Deploying MacOS"
rm src/main/resources/*j2v8*
cp jni/libj2v8_macosx_x86_64.dylib src/main/resources/libj2v8_macosx_x86_64.dylib
sed s/\$\{os\}/macosx/g < pom_template.xml > pom1.xml
sed s/\$\{arch\}/x86_64/g < pom1.xml > pom2.xml
sed s/\$\{ws\}/cocoa/g < pom2.xml > pom.xml
mvn -Dos=macosx -Darch=x86_64 clean deploy $SUFFIX
cp pom_template.xml pom.xml
rm pom1.xml
rm pom2.xml
STATUS=$?
if [ $STATUS -eq 0 ]; then
echo "MacOS Deployment Successful"
else
echo "MacOS Deployment Failed"
exit $STATUS
fi
cp target/j2v8_macosx_x86_64-*.jar releng/plugins
echo "Deploying Win32/x86"
rm src/main/resources/*j2v8*
cp jni/libj2v8_win32_x86.dll src/main/resources/libj2v8_win32_x86.dll
sed s/\$\{os\}/win32/g < pom_template.xml > pom1.xml
sed s/\$\{arch\}/x86/g < pom1.xml > pom2.xml
sed s/\$\{ws\}/win32/g < pom2.xml > pom.xml
mvn -Dos=macosx -Darch=x86_64 clean deploy $SUFFIX
mvn -Dos=win32 -Darch=x86 clean deploy $SUFFIX
cp pom_template.xml pom.xml
rm pom1.xml
rm pom2.xml
STATUS=$?
if [ $STATUS -eq 0 ]; then
echo "Win32 Deployment Successful"
else
echo "Win32 Deployment Failed"
exit $STATUS
fi
cp target/j2v8_win32_x86-*.jar releng/plugins
echo "Deploying Win32/x64"
rm src/main/resources/*j2v8*
cp jni/libj2v8_win32_x86_64.dll src/main/resources/libj2v8_win32_x86_64.dll
sed s/\$\{os\}/win32/g < pom_template.xml > pom1.xml
sed s/\$\{arch\}/x86_64/g < pom1.xml > pom2.xml
sed s/\$\{ws\}/win32/g < pom2.xml > pom.xml
mvn -Dos=win32 -Darch=x86 clean deploy $SUFFIX
cp pom_template.xml pom.xml
rm pom1.xml
rm pom2.xml
STATUS=$?
if [ $STATUS -eq 0 ]; then
echo "Win32_64 Deployment Successful"
else
echo "Win32_64 Deployment Failed"
exit $STATUS
fi
cp target/j2v8_win32_x86_64-*.jar releng/plugins
echo "Deploying Linux"
rm src/main/resources/*j2v8*
cp jni/libj2v8_linux_x86_64.so src/main/resources/libj2v8_linux_x86_64.so
sed s/\$\{os\}/linux/g < pom_template.xml > pom1.xml
sed s/\$\{arch\}/x86_64/g < pom1.xml > pom2.xml
sed s/\$\{ws\}/gtk/g < pom1.xml > pom.xml
mvn -Dos=linux -Darch=x86_64 clean deploy $SUFFIX
cp pom_template.xml pom.xml
rm pom1.xml
rm pom2.xml
STATUS=$?
if [ $STATUS -eq 0 ]; then
echo "Linux Deployment Successful"
else
echo "Linux Deployment Failed"
exit $STATUS
fi
cp target/j2v8_linux_x86_64-*.jar releng/plugins
rm src/main/resources/*j2v8*
echo "Deploying Android"
./gradlew clean build uploadArchives