docs
authorMichael Wallner <mike@php.net>
Fri, 28 Jun 2013 21:01:32 +0000 (23:01 +0200)
committerMichael Wallner <mike@php.net>
Fri, 28 Jun 2013 21:01:32 +0000 (23:01 +0200)
README.md
lib/btr/btr.sh
lib/btr/tmp.sh [deleted file]

index 1c8a17ff5d62f329c09ee63b897fd936160e2fb1..e36ea38d008bd976ea1eb5b4431734b7477015a1 100644 (file)
--- a/README.md
+++ b/README.md
@@ -8,4 +8,4 @@ A simple tool to automate reporting of build and test results.
 
 * source: git, svn
 * build: php, pecl
-
+* report: mail
index 04cf1c209922910ac76677d1faf405119fd88944..16c9d6b6bacdccc277d4ad1ff113a4e8bfbf9593 100755 (executable)
@@ -18,8 +18,8 @@ function help {
     echo "    -C, --configure=<options>     Define \$CONFIGURE options"
     echo
     echo "  Rulesets:"
-    echo "    source: git"
-    echo "    build:  php"
+    echo "    source: git, svn"
+    echo "    build:  php, pecl"
     echo "    report: mail"
     echo
     exit
diff --git a/lib/btr/tmp.sh b/lib/btr/tmp.sh
deleted file mode 100755 (executable)
index f304c6a..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/bin/sh
-
-
-function checkout {
-    mkdir -p "$BTRDIR" && cd "$BTRDIR" || error
-
-    if test -d "$CLEAN_DIR"
-    then
-        echo Pulling updates...
-        cd "$CLEAN_DIR" && git pull || error
-        cd ..
-    else
-        git clone "$SOURCE_URL" "$CLEAN_DIR" || error
-    fi
-
-    if test -d "$BRANCH_DIR"
-    then
-        cd "$BRANCH_DIR" && git pull || error
-        cd ..
-    else
-        git-new-workdir "$CLEAN_DIR" "$BRANCH_DIR" "$BRANCH" || error
-    fi
-    echo
-}
-
-function report {
-    echo "Reporting..."
-    cd "$BTRDIR" || error
-    echo "Running '$REPORT_COMMAND'"
-    local REPORT_ERROR=$(eval "$REPORT_COMMAND" 2>&1) || error $REPORT_ERROR
-    exit
-}
-
-function build {
-    echo "Building..."
-    cd "$BTRDIR" || error
-    mkdir -p "$BUILD_DIR" || error
-
-    echo "Running '$BUILD_COMMAND'"
-    if ! eval "$BUILD_COMMAND" > "$BUILD_REPORT" 2>&1
-    then
-        SUCCESS=FAILURE
-        report <<EOF
-
-btr report for $BUILD
-
-FAILURE: build
-COMMAND: $BUILD_COMMAND
-
-$(cat "$BTRDIR/$BUILD_REPORT")
-
--- 
-btr
-
-EOF
-    fi
-    echo
-}
-
-function diffsum {
-    cd "$BTRDIR" || error
-    local LAST_TEST_REPORT=$(ls ".btr+tests-$BUILD-"* | tail -2 | head -1)
-    if test "$TEST_REPORT" != "$LAST_TEST_REPORT"
-    then
-        local LAST_TESTS_PASSED=$(awk '/^Tests passed/ {print $4}' "$LAST_TEST_REPORT")
-        local LAST_TESTS_FAILED=$(awk '/^Tests failed/ {print $4}' "$LAST_TEST_REPORT")
-        local TESTS_PASSED=$(awk '/^Tests passed/ {print $4}' "$TEST_REPORT")
-        local TESTS_FAILED=$(awk '/^Tests failed/ {print $4}' "$TEST_REPORT")
-
-        local DIFF_TEST_REPORT=$(diff -u $LAST_TEST_REPORT $TEST_REPORT)
-        DIFFSUM="+$(grep -c "^+" <<<"$DIFF_TEST_REPORT")/-$(grep -c "^-" <<<"$DIFF_TEST_REPORT")"
-    fi
-}
-
-function tests {
-    echo "Testing..."
-    cd "$BTRDIR" || error
-    
-    echo "Running '$TEST_COMMAND'"
-    if ! eval "$TEST_COMMAND" > "$TEST_REPORT" 2>&1
-    then
-        SUCCESS=FAILURE
-    else
-        SUCCESS=SUCCESS
-        diffsum
-    fi
-    echo
-}
-