File tree Expand file tree Collapse file tree 2 files changed +25
-53
lines changed Expand file tree Collapse file tree 2 files changed +25
-53
lines changed Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /bin/sh
2
2
3
- # Create a zip file for Windows, Linux and Apple macOS
3
+ # Create a zip file for Linux and Apple macOS
4
4
5
- # this will be set later
5
+ # This will be set later
6
6
unset RELEASE_ZIP_FILE
7
7
8
- # ----------- check for Windows, Linux and Apple macOS build
8
+ # ----------- check for Linux and Apple macOS build
9
9
if [ " $TRAVIS_OS_NAME " = " linux" ]
10
10
then
11
-
12
- # wine = windows
13
- if [ " $LAZ_ENV " = " wine" ]
14
- then
15
-
16
- # windows
17
- export RELEASE_ZIP_FILE=" trackereditor_win32.zip"
18
- zip -j $RELEASE_ZIP_FILE enduser/* .txt enduser/trackereditor.exe enduser/libeay32.dll enduser/ssleay32.dll
19
-
20
- else
21
-
22
- # linux
11
+ # Linux
12
+ echo " Building zip file for Linux amd64"
23
13
export RELEASE_ZIP_FILE=" trackereditor_linux_amd64.zip"
24
14
zip -j $RELEASE_ZIP_FILE enduser/* .txt enduser/trackereditor
25
15
26
- fi
27
-
28
16
elif [ " $TRAVIS_OS_NAME " = " osx" ]
29
17
then
30
- # Apple os x
18
+ # Apple macOS
19
+ echo " Building zip file for macOS"
31
20
export RELEASE_ZIP_FILE=" trackereditor_macOS.zip"
32
21
cd enduser
33
22
34
- # move the executable to the application bundle
23
+ # Move the executable to the application bundle
35
24
mv trackereditor trackereditor.app/Contents/MacOS
36
25
37
- # move the trackers list to application bundle
26
+ # Move the trackers list to application bundle
38
27
mv add_trackers.txt trackereditor.app/Contents/MacOS
39
28
mv remove_trackers.txt trackereditor.app/Contents/MacOS
40
29
41
- # Create the zip file.
30
+ # Create the zip file.
42
31
zip -j ../$RELEASE_ZIP_FILE * .txt
43
32
zip -r ../$RELEASE_ZIP_FILE trackereditor.app
44
33
cd ..
Original file line number Diff line number Diff line change 1
- #! /bin/bash
2
-
3
- # Run unit test in Windows, Linux and macOS
1
+ #! /bin/sh
4
2
3
+ # Run unit test in Windows, Linux and macOS
5
4
6
5
# ----------- check for Windows, Linux and macOS build
7
6
if [ " $TRAVIS_OS_NAME " = " linux" ]
8
7
then
9
8
# show Linux OS version
10
9
uname -a
11
10
12
- # show openSSL version
11
+ # show openSSL version
13
12
openssl version
14
13
15
- # wine = windows
16
- if [ " $LAZ_ENV " = " wine" ]
17
- then
18
-
19
- # windows via 'Wine' does not work.
20
- # wine enduser/test_trackereditor.exe -a --format=plain
21
- echo There is no unit test for wine windows.
22
- echo unit test is run via AppVeyor
23
-
24
- else
25
-
26
- # linux
27
- enduser/test_trackereditor -a --format=plain
28
-
29
- fi
30
-
31
14
elif [ " $TRAVIS_OS_NAME " = " osx" ]
32
15
then
33
16
# show macOS version
34
17
sw_vers
35
18
36
- # show openSSL version
19
+ # show openSSL version
37
20
openssl version
38
-
39
- # macOS
40
- # does not work.
41
- # enduser/test_trackereditor -a --format=plain
42
- echo There is no unit test for macOS.
43
-
44
21
fi
45
22
46
- # Remove all the extra file created by test
47
- rm enduser/console_log.txt
48
- rm enduser/export_trackers.txt
23
+ # Exit immediately if a command exits with a non-zero status.
24
+ set -e
25
+ enduser/test_trackereditor -a --format=plain
26
+ set +e
27
+
28
+ # Remove all the extra file created by test
29
+ # We do not what it in the ZIP release files.
30
+ rm -f enduser/console_log.txt
31
+ rm -f enduser/export_trackers.txt
49
32
50
- # Undo all changes made by testing.
33
+ # Undo all changes made by testing.
51
34
git reset --hard
You can’t perform that action at this time.
0 commit comments