-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy path.travis-build.sh
48 lines (38 loc) · 986 Bytes
/
.travis-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
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
set -e
set -x
if [ -z $TRAVIS_OS_NAME ]; then
echo "This file is for automated builds only. Please use the make for local builds."
exit -1
fi
if [ "_$OSTYPE" = "_msys" ]; then
unset CC
export CC=i686-w64-mingw32-gcc
export STRIP=i686-w64-mingw32-strip
fi
make all
GIT=$(git describe --tags --always)
DATE=$(date +'%Y%m%d')
DESTDIR="build/EASYPDKPROG"
mkdir -p $DESTDIR
if [ "$OSTYPE" == "msys" ]; then
OS="WIN"
cp easypdkprog $DESTDIR/easypdkprog.exe
cp -r Windows_STM32VCPDriver $DESTDIR
else
if [[ $OSTYPE =~ darwin.* ]]; then
OS="MAC"
cp easypdkprog $DESTDIR
else
OS="LINUX"
cp easypdkprog $DESTDIR
cp -r Linux_udevrules $DESTDIR
fi
fi
cp INSTALL LICENSE $DESTDIR
mkdir -p $DESTDIR/Firmware
cp Firmware/EASYPDKPROG.dfu Firmware/LICENCE-ADDITONAL Firmware/README $DESTDIR/Firmware
cp -r Examples $DESTDIR
cd build
zip -r -9 "EASYPDKPROG_${OS}_${DATE}_${GIT}.zip" "EASYPDKPROG"
cd ..