-
Notifications
You must be signed in to change notification settings - Fork 127
/
Autobuild.sh
executable file
·65 lines (56 loc) · 960 Bytes
/
Autobuild.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
#
# Entry point for the Doozer autobuild system
#
# (c) Andreas Öman 2011. All rights reserved.
#
#
set -e
JARGS=""
TARGET=""
RELEASE="--release"
WORKINGDIR="/var/tmp/showtime-autobuild"
while getopts "t:j:w:v:" OPTION
do
case $OPTION in
t)
TARGET="$OPTARG"
;;
j)
JARGS="-j$OPTARG"
;;
w)
WORKINGDIR="$OPTARG"
;;
v)
VERSION="$OPTARG"
VERSIONARGS="--version=$OPTARG"
;;
esac
done
if [[ -z $TARGET ]]; then
echo "target (-t) not specified"
exit 1
fi
echo "VERSION: $VERSION"
if [ "$VERSION" = "unset" ] ; then
VERSION="0.0.0"
fi
#
# $1 = local file path
# $2 = type
# $3 = content-type
# $4 = filename
#
artifact() {
echo "doozer-artifact:$PWD/$1:$2:$3:$4"
}
versioned_artifact() {
echo "doozer-versioned-artifact:$PWD/$1:$2:$3:$4"
}
if [ -f Autobuild/${TARGET}.sh ]; then
source Autobuild/${TARGET}.sh
else
echo "target $TARGET not supported"
exit 1
fi