forked from tvheadend/tvheadend
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Autobuild.sh
executable file
·79 lines (71 loc) · 1.22 KB
/
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
#
# Entry point for the Doozer autobuild system
#
# (c) Andreas Öman 2011. All rights reserved.
#
#
set -eu
BUILD_API_VERSION=3
EXTRA_BUILD_NAME=""
JARGS=""
JOBSARGS=""
TARGET="debian"
RELEASE="--release"
WORKINGDIR="/var/tmp/showtime-autobuild"
FILELIST="$PWD/filelist.txt"
OP="build"
while getopts "vht:e:j:w:o:c:" OPTION
do
case $OPTION in
v)
echo $BUILD_API_VERSION
exit 0
;;
h)
echo "This script is intended to be used by the autobuild system only"
exit 0
;;
t)
TARGET="$OPTARG"
;;
e)
EXTRA_BUILD_NAME="$OPTARG"
;;
j)
JOBSARGS="--jobs=$OPTARG"
JARGS="-j$OPTARG"
;;
w)
WORKINGDIR="$OPTARG"
;;
o)
OP="$OPTARG"
;;
esac
done
if [[ -z $TARGET ]]; then
echo "target (-t) not specified"
exit 1
fi
#
# $1 = local file path
# $2 = type
# $3 = content-type
# $4 = filename
#
artifact() {
echo "doozer-artifact:$PWD/$1:$2:$3:$4"
echo "$PWD/$1" >> "$FILELIST"
}
versioned_artifact() {
echo "doozer-versioned-artifact:$PWD/$1:$2:$3:$4"
echo "$PWD/$1" >> "$FILELIST"
}
git status
if [ -f Autobuild/${TARGET}.sh ]; then
source Autobuild/${TARGET}.sh
else
echo "target $TARGET not supported"
exit 1
fi