Skip to content
This repository was archived by the owner on Dec 11, 2018. It is now read-only.

Commit 049fa74

Browse files
committedFeb 25, 2017
Simplify the CI script
1 parent bc12f35 commit 049fa74

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed
 

‎.travis.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,4 @@ before_install:
2828
# Build
2929
script:
3030
- sysconfcpus -n 2 yarn test
31-
- cd "$TRAVIS_BUILD_DIR"/example
32-
- sysconfcpus -n 2 ../node_modules/.bin/elm-make --yes CoinFlip.elm
31+
- sysconfcpus -n 2 ./example/run --build-only

‎example/run

+17-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
#!/bin/bash
2-
cd "${0%/*}" &&\
3-
( cd .. && yarn ) &&\
4-
../node_modules/.bin/elm-make --yes CoinFlip.elm &&\
5-
python2 -m SimpleHTTPServer 8000
2+
3+
# Change the working directory to the script's directory
4+
cd "${0%/*}" || exit 1
5+
6+
# Install dependencies
7+
( cd .. && yarn ) || exit 1
8+
9+
# Build the sample app
10+
../node_modules/.bin/elm-make --yes CoinFlip.elm || exit 1
11+
12+
# Stop if '--build-only' option is given
13+
if [ "${BASH_ARGV[0]}" == "--build-only" ]; then
14+
exit 0
15+
fi
16+
17+
# Run the server
18+
python2 -m SimpleHTTPServer 8000

0 commit comments

Comments
 (0)