-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.sh
executable file
·95 lines (68 loc) · 3.16 KB
/
.travis.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
87
88
89
90
91
92
93
94
95
#!/bin/bash
set -x
# Be safe and clean!
./gradlew clean
#
# The GUI build/upload process is divided in:
#
# (1) the "plugin upload" of 6 JAR files (windows/linux/mac in 32/64 bit) and
# 2 DEB files (32/64 bit):
#
# - (a) JAR for Linux 32-bit
# - (b) JAR for Linux 64-bit
# - (c) JAR for Windows 32-bit
# - (d) JAR for Windows 64-bit
# - (e) JAR for Mac OSX 32-bit
# - (f) JAR for Mac OSX 64-bit
# - (g) DEB for 32-bit
# - (h) DEB for 64-bit
#
# (2) and the "application upload" of 2 EXE files (32/64 bit) and
# 1 APP.ZIP file (64 bit):
#
# - (i) APP.ZIP for 64-bit
# - (j) EXE for 32-bit
# - (k) EXE for 64-bit
#
# They are treated differently during the upload and on the server side, so
# it is important to keep the order!
#
## (0) Requirements ############################################################
mkdir -p build/osx-notifier
wget https://www.syncany.org/r/syncany-osx-notifier-latest.app.zip -O build/osx-notifier/osx-notifier.zip
## (1) Plugin ##################################################################
# Build JARs for different Windows and Linux
./gradlew pluginJar -Pos=linux -Parch=x86 # (a)
rm build/resources/main/org/syncany/plugins/gui/plugin.properties
./gradlew pluginJar -Pos=linux -Parch=x86_64 # (b)
rm build/resources/main/org/syncany/plugins/gui/plugin.properties
./gradlew pluginJar -Pos=windows -Parch=x86 # (c)
rm build/resources/main/org/syncany/plugins/gui/plugin.properties
./gradlew pluginJar -Pos=windows -Parch=x86_64 # (d)
# Build JARs for Mac OSX (needs the syncany-osx-notifier)
mkdir -p src/main/resources/org/syncany/gui/helper
cp build/osx-notifier/osx-notifier.zip src/main/resources/org/syncany/gui/helper/osx-notifier.zip
rm build/resources/main/org/syncany/plugins/gui/plugin.properties
./gradlew pluginJar -Pos=macosx -Parch=x86 # (e)
rm build/resources/main/org/syncany/plugins/gui/plugin.properties
./gradlew pluginJar -Pos=macosx -Parch=x86_64 # (f)
rm -rf src/main/resources/org/syncany/gui/helper
# Build Debian DEBs
rm build/resources/main/org/syncany/plugins/gui/plugin.properties
./gradlew pluginDebianGuiDeb -Pos=linux -Parch=x86 -PpluginJarDontCopyToUpload # (g)
rm build/resources/main/org/syncany/plugins/gui/plugin.properties
./gradlew pluginDebianGuiDeb -Pos=linux -Parch=x86_64 -PpluginJarDontCopyToUpload # (h)
## (2) Application #############################################################
# Create a OSX standalone app in upload dir
mkdir -p src/main/resources/org/syncany/gui/helper
cp build/osx-notifier/osx-notifier.zip src/main/resources/org/syncany/gui/helper/osx-notifier.zip
rm build/resources/main/org/syncany/plugins/gui/plugin.properties
./gradlew createAppZip -Pos=macosx -Parch=x86_64 # (i)
rm -rf src/main/resources/org/syncany/gui/helper
# Build Windows installer
rm build/resources/main/org/syncany/plugins/gui/plugin.properties
./gradlew exeWithGui -Pos=windows -Parch=x86 -PpluginJarDontCopyToUpload # (j)
rm build/resources/main/org/syncany/plugins/gui/plugin.properties
./gradlew exeWithGui -Pos=windows -Parch=x86_64 -PpluginJarDontCopyToUpload # (k)
## (3) Upload them #############################################################
core/gradle/upload/upload-plugin.sh