couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nsla...@apache.org
Subject [3/3] git commit: Add auto_distcheck.sh script
Date Sun, 10 Mar 2013 21:05:10 GMT
Updated Branches:
  refs/heads/master ac1ba865e -> 84d45cb6c


Add auto_distcheck.sh script


Project: http://git-wip-us.apache.org/repos/asf/couchdb-admin/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-admin/commit/84d45cb6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-admin/tree/84d45cb6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-admin/diff/84d45cb6

Branch: refs/heads/master
Commit: 84d45cb6c5e870128d72c8f601f1ad166651c4ca
Parents: 185ca0d
Author: Noah Slater <nslater@apache.org>
Authored: Sun Mar 10 21:05:01 2013 +0000
Committer: Noah Slater <nslater@apache.org>
Committed: Sun Mar 10 21:05:01 2013 +0000

----------------------------------------------------------------------
 release/auto_distcheck.sh |   54 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-admin/blob/84d45cb6/release/auto_distcheck.sh
----------------------------------------------------------------------
diff --git a/release/auto_distcheck.sh b/release/auto_distcheck.sh
new file mode 100755
index 0000000..75d361d
--- /dev/null
+++ b/release/auto_distcheck.sh
@@ -0,0 +1,54 @@
+#!/bin/sh -e
+
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+if test -n "$1"; then
+    version=$1
+else
+    echo "error: no version"
+    exit 1
+fi
+
+log () {
+    printf "\033[1;31m$1\033[0m\n"
+}
+
+basename=`basename $0`
+
+temp_dir=`mktemp -d /tmp/${basename}.XXXXXX` || exit 1
+
+exit="echo Files in: $temp_dir"
+
+trap "echo && $exit && kill 0" SIGINT
+
+while true; do
+    sleep 5
+    log "Checking build..."
+    if test -s apache-couchdb-$version.tar.gz; then
+        break
+    else
+		time_start=`date "+%s"`
+		log_file=$temp_dir/$time_start".txt"
+		echo "Build started `date -r $time_start`" > $log_file
+		make distcheck | tee -a $log_file
+		time_finish=`date "+%s"`
+		echo "Build finished `date -r $time_finish`" >> $log_file
+		total_time=`expr $time_finish - $time_start`
+		echo "Build took `TZ=UTC date -r $total_time +%H:%M:%S`" >> $log_file
+    fi
+done
+
+log "Build success..."
+
+$exit
+


Mime
View raw message