forked from afterlogic/webmail-lite-8
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtravis.sh
More file actions
53 lines (39 loc) · 1.28 KB
/
travis.sh
File metadata and controls
53 lines (39 loc) · 1.28 KB
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
#!/bin/bash
DIR=$(cd `dirname $0` && pwd)
TASK="build"
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-t|--task)
TASK="$2"
shift # past argument
shift # past value
;;
*) # unknown option
POSITIONAL+=("$1") # save it in an array for later
shift # past argument
;;
esac
done
set -- "${POSITIONAL[@]}" # restore positional parameters
echo TASK: "$TASK"
if [ "$TASK" = "build" ]; then
cd ${DIR}
npm install -g gulp-cli
npm install ./modules/CoreWebclient
gulp styles --themes Default,DeepForest,Funny --build a
gulp js:build --build a
gulp js:min --build a
gulp test
PRODUCT_VERSION=`cat VERSION`
echo CREATE ZIP FILE: "${PRODUCT_NAME}_${PRODUCT_VERSION}.zip"
zip -rq ${PRODUCT_NAME}_${PRODUCT_VERSION}.zip data/settings/config.json data/settings/modules modules static system vendor dev ".htaccess" dav.php index.php LICENSE VERSION README.md favicon.ico robots.txt composer.json composer.lock modules.json gulpfile.js pre-config.json -x **/*.bak *.git*
fi
if [ "$TASK" = "upload" ]; then
cd ${DIR}
PRODUCT_VERSION=`cat VERSION`
echo UPLOAD ZIP FILE: "${PRODUCT_NAME}_${PRODUCT_VERSION}.zip"
curl --ftp-create-dirs --retry 6 -T ${PRODUCT_NAME}_${PRODUCT_VERSION}.zip -u ${FTP_USER}:${FTP_PASSWORD} ftp://afterlogic.com/
fi