-
Notifications
You must be signed in to change notification settings - Fork 18
/
trigger-django-openstack-new
executable file
·59 lines (46 loc) · 1.24 KB
/
trigger-django-openstack-new
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
#!/bin/bash
abspath="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")"
dirname="$(dirname $abspath)"
cd "$dirname" || exit -1
OurSpec="django-openstack.spec"
prj=$(grep '^Name:' $OurSpec | sed 's/^Name:\s\+//')
source trigger.conf
GithubUserProject="4P/openstack-dashboard.git"
ActualVersion="$(grep '^Version:' $OurSpec | sed 's/^Version:\s\+//')"
ActualRelease="0.`date +%Y%m%d.%H`"
ActualTarBall=%{name}-%{version}.tar.gz
source build_helpers
# If you need to build a specific version - specify it as ./build release_num (digits only).
# If build # is not specified, latest available tarball will be built
case "$1" in
build)
get_git
# check_for_update
# check_enviroment
update_spec
#
# get_tarball
create_srpm
create_rpm #&& commit_spec || undo_changes
sign_rpm
update_repo
# #do_mock
;;
check)
check_for_update
# curl -s "http://$jenkins/job/$JobName/build"
[ $Debug ] && echo "Fire jenkins to build $JobName"
exit 0
;;
release)
ActualRelease=$2
build
;;
*)
echo $"Usage: $0 {build|check|release}"
echo "build - build rpms"
echo "check - check for updates and trigger jenkins"
echo "release NUM - build specified release"
exit 2
esac
exit $?