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
22
3- # Create a zip file for Windows, Linux and Apple macOS
3+ # Create a zip file for Linux and Apple macOS
44
5- # this will be set later
5+ # This will be set later
66unset RELEASE_ZIP_FILE
77
8- # ----------- check for Windows, Linux and Apple macOS build
8+ # ----------- check for Linux and Apple macOS build
99if [ " $TRAVIS_OS_NAME " = " linux" ]
1010then
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"
2313 export RELEASE_ZIP_FILE=" trackereditor_linux_amd64.zip"
2414 zip -j $RELEASE_ZIP_FILE enduser/* .txt enduser/trackereditor
2515
26- fi
27-
2816elif [ " $TRAVIS_OS_NAME " = " osx" ]
2917then
30- # Apple os x
18+ # Apple macOS
19+ echo " Building zip file for macOS"
3120 export RELEASE_ZIP_FILE=" trackereditor_macOS.zip"
3221 cd enduser
3322
34- # move the executable to the application bundle
23+ # Move the executable to the application bundle
3524 mv trackereditor trackereditor.app/Contents/MacOS
3625
37- # move the trackers list to application bundle
26+ # Move the trackers list to application bundle
3827 mv add_trackers.txt trackereditor.app/Contents/MacOS
3928 mv remove_trackers.txt trackereditor.app/Contents/MacOS
4029
41- # Create the zip file.
30+ # Create the zip file.
4231 zip -j ../$RELEASE_ZIP_FILE * .txt
4332 zip -r ../$RELEASE_ZIP_FILE trackereditor.app
4433 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
42
3+ # Run unit test in Windows, Linux and macOS
54
65# ----------- check for Windows, Linux and macOS build
76if [ " $TRAVIS_OS_NAME " = " linux" ]
87then
98 # show Linux OS version
109 uname -a
1110
12- # show openSSL version
11+ # show openSSL version
1312 openssl version
1413
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-
3114elif [ " $TRAVIS_OS_NAME " = " osx" ]
3215then
3316 # show macOS version
3417 sw_vers
3518
36- # show openSSL version
19+ # show openSSL version
3720 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-
4421fi
4522
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
4932
50- # Undo all changes made by testing.
33+ # Undo all changes made by testing.
5134git reset --hard
You can’t perform that action at this time.
0 commit comments