forked from graylog-labs/graylog2-web-interface
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_release.sh
executable file
·43 lines (34 loc) · 1 KB
/
build_release.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
#!/bin/bash -e
ACTIVATOR_VERISON='1.2.10'
ACTIVATOR_URL="http://downloads.typesafe.com/typesafe-activator/${ACTIVATOR_VERISON}/typesafe-activator-${ACTIVATOR_VERISON}-minimal.zip"
ACTIVATOR_BIN=$(which activator)
if [[ -z "${ACTIVATOR_BIN}" ]]; then
ACTIVATOR_BIN="${ACTIVATOR_PATH}/activator"
if [[ ! -x "${ACTIVATOR_BIN}" ]]; then
echo "ERROR: Couldn't find Typesafe Activator in \$PATH or \$ACTIVATOR_PATH."
echo
echo "Please download and install Typesafe Activator before running this script:"
echo
echo " wget ${ACTIVATOR_URL}"
echo
exit 1
fi
fi
# Clean working directory
"${ACTIVATOR_BIN}" clean
# Prepare JavaScript
pushd javascript
# Install same npm version as we use in travis
rm -rf ./node_modules
npm install [email protected]
PATH="$(pwd)/node_modules/.bin/":$PATH
npm install
npm test
gulp deploy-prod
popd
# Build universal .tar.gz
"${ACTIVATOR_BIN}" universal:package-zip-tarball
date
echo "Your package(s) are ready in 'target/universal':"
echo
ls -lt ./target/universal/*