source: trunk/packages/invirt-dev/build-hooks/post-submit

Last change on this file was 3036, checked in by gdb, 14 years ago

Added reporting

  • Property svn:executable set to *
File size: 814 bytes
Line 
1#!/bin/sh
2
3set -e
4set -u
5
6escape() {
7    echo "$1" | sed -e 's/@/@@/g'
8}
9
10pocket=$(escape "$1")
11package=$(escape "$2")
12commit=$(escape "$3")
13principal=$(escape "$4")
14
15base=build.hooks.post_submit.zephyr
16class=$(invirt-getconf "$base.class" 2>/dev/null || :)
17instance=$(invirt-getconf "$base.instance" 2>/dev/null || :)
18zsig=$(invirt-getconf "$base.zsig" 2>/dev/null || :)
19
20if [ -z "$class" ]; then
21  echo "I don't know where to send a commit zephyr!" >&2
22  echo "Please provide a value for $base.class in" >&2
23  echo "your invirt config file." >&2
24  exit 1
25fi
26
27(echo "A new job has been submitted to the Invirtibuilder:";
28 echo;
29 echo "pocket: $pocket";
30 echo "package: $package";
31 echo "commit: $commit";
32 echo "principal: $principal") | zwrite -c "$class" -i "${instance:-$commit}" -s "${zsig:-Git}: $pocket" -d
Note: See TracBrowser for help on using the repository browser.