source: trunk/packages/invirt-dev/build-hooks/pre-build @ 3038

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

Added reporting

  • Property svn:executable set to *
File size: 905 bytes
RevLine 
[3036]1#!/bin/sh
2
3set -e
4set -u
5
6escape() {
7    echo "$1" | sed -e 's/@/@@/g'
8}
9
10build_id=$(escape "$1")
11pocket=$(escape "$2")
12package=$(escape "$3")
13commit=$(escape "$4")
14principal=$(escape "$5")
15version=$(escape "$6")
16inserted_at=$(escape "$7")
17
18base=build.hooks.pre_build.zephyr
19class=$(invirt-getconf "$base.class" 2>/dev/null || :)
20instance=$(invirt-getconf "$base.instance" 2>/dev/null || :)
21zsig=$(invirt-getconf "$base.zsig" 2>/dev/null || :)
22
23if [ -z "$class" ]; then
24  echo "I don't know where to send a commit zephyr!" >&2
25  echo "Please provide a value for $base.class in" >&2
26  echo "your invirt config file." >&2
27  exit 1
28fi
29
30(echo "About to begin an Invirtibuild of $package v$version in $pocket."
31 echo "from commit $commit.";
32 echo
33 echo "(Build $build_id was submitted by $principal at $inserted_at.)") | zwrite -c "$class" -i "${instance:-build_$build_id}" -s "${zsig:-pre-build}: $pocket" -d
Note: See TracBrowser for help on using the repository browser.