Browse Source

fixed travis script

Daniel Zlotin 7 years ago
parent
commit
4f192b29dc
1 changed files with 7 additions and 2 deletions
  1. 7
    2
      scripts/travis.sh

+ 7
- 2
scripts/travis.sh View File

1
 #!/bin/bash -e
1
 #!/bin/bash -e
2
 
2
 
3
-color='\033[1;36m'
3
+lightCyan='\033[1;36m'
4
+green='\033[0;32m'
4
 nocolor='\033[0m'
5
 nocolor='\033[0m'
5
 
6
 
6
 run_f () {
7
 run_f () {
8
   name=${cmd//[ ]/_}
9
   name=${cmd//[ ]/_}
9
 
10
 
10
   echo "travis_fold:start:$name"
11
   echo "travis_fold:start:$name"
11
-  echo -e "${color}\t $cmd \t${nocolor}"
12
+  echo -e "${lightCyan}\t\t $cmd ${nocolor}"
13
+  SECONDS=0
12
 
14
 
13
   ($cmd)
15
   ($cmd)
14
 
16
 
17
+  duration=$SECONDS
15
   echo "travis_fold:end:$name"
18
   echo "travis_fold:end:$name"
19
+  echo -e "${green}\t\t\t --> $(($duration / 60)) minutes and $(($duration % 60)) seconds ${nocolor}"
20
+  echo "\n"
16
 }
21
 }
17
 
22
 
18
 run_f "yarn install"
23
 run_f "yarn install"