forked from scala/community-build
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·50 lines (39 loc) · 1.37 KB
/
Copy pathrun.sh
File metadata and controls
executable file
·50 lines (39 loc) · 1.37 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
#!/usr/bin/env bash
# This script is suitable for local use.
# It is also invoked by Jenkins (from scripts/jobs/integrate/community-build).
# usage:
# ./run.sh
# ./run.sh project1
# ./run.sh project1,project2,project3
set -e
set -o pipefail
export LANG="en_US.UTF-8"
export HOME="$(pwd)"
DBUILDVERSION=0.9.9
echo "dbuild version: $DBUILDVERSION"
DBUILDCONFIG=community.dbuild
echo "dbuild config file: $DBUILDCONFIG"
if [ ! -f "$DBUILDCONFIG" ]
then
echo "File not found: $DBUILDCONFIG"
exit 1
fi
if [ ! -d "dbuild-${DBUILDVERSION}" ]
then
wget "http://repo.lightbend.com/typesafe/ivy-releases/com.typesafe.dbuild/dbuild/${DBUILDVERSION}/tgzs/dbuild-${DBUILDVERSION}.tgz"
tar xfz "dbuild-${DBUILDVERSION}.tgz"
rm "dbuild-${DBUILDVERSION}.tgz"
fi
# sigh, Ubuntu has nodejs but OS X has node
if hash nodejs 2>/dev/null; then
export NODE=nodejs
else
export NODE=node
fi
# use -n since running locally you don't want notifications sent,
# and on our Jenkins setup it doesn't actually work (for now anyway)
echo "dbuild-${DBUILDVERSION}/bin/dbuild" -n "$DBUILDCONFIG" "${@}"
("dbuild-${DBUILDVERSION}/bin/dbuild" -n "$DBUILDCONFIG" "${@}" 2>&1 | tee "dbuild-${DBUILDVERSION}/dbuild.out") || STATUS=$?
BUILD_ID="$(grep '^\[info\] uuid = ' "dbuild-${DBUILDVERSION}/dbuild.out" | sed -e 's/\[info\] uuid = //')"
echo "The repeatable UUID of this build was: ${BUILD_ID}"
exit $STATUS