From c1e58a0563663005f4fa4c22a4ecac09837fe9dc Mon Sep 17 00:00:00 2001 From: Andre Anjos <andre.anjos@idiap.ch> Date: Thu, 22 Sep 2016 18:29:19 +0200 Subject: [PATCH] Improve scripts slightly --- gitlab/after_docs.sh | 2 ++ gitlab/after_wheels.sh | 2 ++ gitlab/before_docs.sh | 2 ++ gitlab/before_test.sh | 11 +---------- gitlab/before_wheels.sh | 2 ++ gitlab/functions.sh | 6 +++--- gitlab/install.sh | 24 +++++++----------------- 7 files changed, 19 insertions(+), 30 deletions(-) diff --git a/gitlab/after_docs.sh b/gitlab/after_docs.sh index e69de29..73a0376 100755 --- a/gitlab/after_docs.sh +++ b/gitlab/after_docs.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +# Thu 22 Sep 2016 18:23:57 CEST diff --git a/gitlab/after_wheels.sh b/gitlab/after_wheels.sh index e69de29..73a0376 100755 --- a/gitlab/after_wheels.sh +++ b/gitlab/after_wheels.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +# Thu 22 Sep 2016 18:23:57 CEST diff --git a/gitlab/before_docs.sh b/gitlab/before_docs.sh index e69de29..73a0376 100755 --- a/gitlab/before_docs.sh +++ b/gitlab/before_docs.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +# Thu 22 Sep 2016 18:23:57 CEST diff --git a/gitlab/before_test.sh b/gitlab/before_test.sh index f2b32a1..1305f3e 100755 --- a/gitlab/before_test.sh +++ b/gitlab/before_test.sh @@ -1,13 +1,4 @@ #!/usr/bin/env bash # Wed 21 Sep 2016 13:08:05 CEST -source $(dirname ${0})/functions.sh - -check_env DOCSERVER -check_env CONDA_PREFIX - -BOB_DOCUMENTATION_SERVER="${DOCSERVER}/software/bob/docs/latest/bob/%s/master/" -PREFIX=`pwd`/${CONDA_PREFIX} - -run_cmd $(dirname ${0})/before_build.sh -run_cmd ${PREFIX}/bin/pip install --use-wheel --no-index --pre dist/*.whl +run_cmd $(dirname ${0})/before_test.sh diff --git a/gitlab/before_wheels.sh b/gitlab/before_wheels.sh index e69de29..73a0376 100755 --- a/gitlab/before_wheels.sh +++ b/gitlab/before_wheels.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +# Thu 22 Sep 2016 18:23:57 CEST diff --git a/gitlab/functions.sh b/gitlab/functions.sh index 7c5a49d..a29876d 100644 --- a/gitlab/functions.sh +++ b/gitlab/functions.sh @@ -11,17 +11,17 @@ arch() { # Functions for coloring echo commands log_info() { - echo -e "\033[1;32m[`date +%c`] ${@}\033[0m" + echo -e "\033[1;32m(`date +%T`) ${@}\033[0m" } log_warn() { - echo -e "\033[1;33m[`date +%c`] ${@}\033[0m" + echo -e "\033[1;33m(`date +%T`) ${@}\033[0m" } log_error() { - echo -e "\033[1;31m[`date +%c`] ${@}\033[0m" + echo -e "\033[1;31m(`date +%T`) ${@}\033[0m" } diff --git a/gitlab/install.sh b/gitlab/install.sh index 3cc2f6d..836ec69 100755 --- a/gitlab/install.sh +++ b/gitlab/install.sh @@ -11,11 +11,11 @@ fi # Functions for coloring echo commands log_info() { - echo -e "\033[1;32m[`date +%c`] ${@}\033[0m" + echo -e "\033[1;32m(`date +%T`) ${@}\033[0m" } log_error() { - echo -e "\033[1;31m[`date +%c`] ${@}\033[0m" + echo -e "\033[1;31m(`date +%T`) ${@}\033[0m" } # Function for running command and echoing results @@ -42,18 +42,8 @@ get_exec() { run_cmd mkdir -pv ${1} get_script ${1} functions.sh -get_exec ${1} before_build.sh -get_exec ${1} build.sh -get_exec ${1} after_build.sh -get_exec ${1} before_test.sh -get_exec ${1} test.sh -get_exec ${1} after_test.sh -get_exec ${1} before_wheels.sh -get_exec ${1} wheels.sh -get_exec ${1} after_wheels.sh -get_exec ${1} before_docs.sh -get_exec ${1} docs.sh -get_exec ${1} after_docs.sh -get_exec ${1} before_deploy.sh -get_exec ${1} deploy.sh -get_exec ${1} after_deploy.sh +for stage in "build" "test" "wheels" "deploy"; do + get_exec ${1} before_${stage}.sh + get_exec ${1} ${stage}.sh + get_exec ${1} after_${stage}.sh +done -- GitLab