forked from bbyars/mountebank
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build
executable file
·23 lines (18 loc) · 726 Bytes
/
build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env sh
IS_PUBLISHED_VERSION=`git describe --tags --exact-match 2>/dev/null`
if [ -n "$CIRCLE_BUILD_NUM" ]; then
if [ -n "$IS_PUBLISHED_VERSION" ]; then
echo "export publish=true" > build.properties
else
echo "export publish=false" > build.properties
fi
fi
if [ -z "$MB_VERSION" ]; then
MB_VERSION=`cat package.json | grep '"version"' | sed -E -e 's/.*"version": "([^"]*)",/\1/'`
fi
# We don't set the version suffix on tagged (published) builds
if [ -n "$CIRCLE_BUILD_NUM" -a -z "$IS_PUBLISHED_VERSION" ]; then
MB_VERSION="$MB_VERSION-beta.$CIRCLE_BUILD_NUM"
fi
npm install
MB_VERSION=$MB_VERSION MB_SLOW_TEST_TIMEOUT=6000 MB_PORT=3535 node_modules/grunt-cli/bin/grunt "$@"