Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[jenkins] Remove debugging
authorGabriel Corona <gabriel.corona@enst-bretagne.fr>
Mon, 27 Jul 2015 15:42:48 +0000 (17:42 +0200)
committerGabriel Corona <gabriel.corona@enst-bretagne.fr>
Mon, 27 Jul 2015 15:42:48 +0000 (17:42 +0200)
buildtools/jenkins/build.sh

index eb87979..0c4a2e2 100755 (executable)
@@ -2,10 +2,23 @@
 
 set -e
 
-echo "Running $0 with arguments:" >&2
-for arg in "$@"; do
-  echo "- $arg"
-done
+# usage: die status message...
+die () {
+  local status=${1:-1}
+  shift
+  [ $# -gt 0 ] || set -- "Error - Halting"
+  echo "$@" >&2
+  exit $status
+}
+
+# Get an ON/OFF string from a command:
+onoff() {
+  if "$@" > /dev/null ; then
+    echo ON
+  else
+    echo OFF
+  fi
+}
 
 build_mode="$1"
 echo "Build mode $build_mode on $(uname -np)" >&2
@@ -20,13 +33,7 @@ case "$build_mode" in
   ;;
 
   *)
-    if test "$(uname -o)" = "Msys"; then
-      echo "On Windows, jenkins is not willing to expand variables for some reason" >&2
-      echo "Force use Debug mode" >&2
-    else
-      echo "Unknown build_mode $build_mode"
-      exit 1
-    fi
+    die 1 "Unknown build_mode $build_mode"
   ;;
 esac
 
@@ -40,24 +47,6 @@ else
   GENERATOR="Unix Makefiles"
 fi
 
-# usage: die status message...
-die () {
-  local status=${1:-1}
-  shift
-  [ $# -gt 0 ] || set -- "Error - Halting"
-  echo "$@" >&2
-  exit $status
-}
-
-# Get an ON/OFF string from a command:
-onoff() {
-  if "$@" > /dev/null ; then
-    echo ON
-  else
-    echo OFF
-  fi
-}
-
 ulimit -c 0 || true
 
 if [ -d $WORKSPACE/build ]