diff --git a/NEWS.rst b/NEWS.rst index 15895d32a3f842c6002c22c8d6ac795d7a105599_TkVXUy5yc3Q=..cf0388ccc9c348e7b1f62b8d39508ae2851066a2_TkVXUy5yc3Q= 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -2,6 +2,11 @@ History ======= +4.1 +--- + +Shell scripts stop assuming that they are in a directory inside the superproject, but assume they are called from the superproject directory instead. + 4.0 --- diff --git a/create_documentation b/create_documentation index 15895d32a3f842c6002c22c8d6ac795d7a105599_Y3JlYXRlX2RvY3VtZW50YXRpb24=..cf0388ccc9c348e7b1f62b8d39508ae2851066a2_Y3JlYXRlX2RvY3VtZW50YXRpb24= 100755 --- a/create_documentation +++ b/create_documentation @@ -9,8 +9,8 @@ # Version 4.0 -here=$(dirname $0) -project_home=$(cd $here && cd .. && echo $PWD) +# assume we are called from the project home +project_home=$PWD project_name_from_home=$(basename $project_home) project_name=${DOC_PROJECT_NAME:-${CI_PROJECT_NAME:-${DRONE_REPO_NAME:-$project_name_from_home}}} languages=(${LANGUAGES:-en}) @@ -111,6 +111,6 @@ elif [ -e ".hg" ]; then branch="$(hg id -b)" else - echo "${RED}WARN${RESET} - Branch name not found, using default" + echo "${RED}WARN${RESET} - Super project branch name not found, using default" branch="default" fi @@ -115,6 +115,6 @@ branch="default" fi -echo "${YELLOW}INFO ${RESET} - Branch name: $branch" +echo "${YELLOW}INFO ${RESET} - Super project branch name: $branch" for doc_dir in doc docs; do if [[ -d "$doc_dir" ]] ; then diff --git a/do_tests b/do_tests index 15895d32a3f842c6002c22c8d6ac795d7a105599_ZG9fdGVzdHM=..cf0388ccc9c348e7b1f62b8d39508ae2851066a2_ZG9fdGVzdHM= 100755 --- a/do_tests +++ b/do_tests @@ -16,7 +16,8 @@ # Version 4.0 here=$(dirname $0) -project_home=$(cd $here && cd .. && echo $PWD) +# assume we are called from the project home +project_home=$PWD if ! type python3 > /dev/null; then python="python2" else diff --git a/run_tests b/run_tests index 15895d32a3f842c6002c22c8d6ac795d7a105599_cnVuX3Rlc3Rz..cf0388ccc9c348e7b1f62b8d39508ae2851066a2_cnVuX3Rlc3Rz 100755 --- a/run_tests +++ b/run_tests @@ -7,7 +7,8 @@ # The DB user can be overriden by setting ODOO_SCRIPTS_DB_USER. # Version 4.0 here=$(dirname $0) -project_home=$(cd $here && cd .. && echo $PWD) +# assume we are called from the project home +project_home=$PWD if ! type python3 > /dev/null; then python="python2" else diff --git a/start b/start index 15895d32a3f842c6002c22c8d6ac795d7a105599_c3RhcnQ=..cf0388ccc9c348e7b1f62b8d39508ae2851066a2_c3RhcnQ= 100755 --- a/start +++ b/start @@ -7,4 +7,5 @@ # ODOO_TYPE can be set instead of putting it in setup.cfg # # Version 4.0 + here=$(dirname "$0") @@ -10,5 +11,6 @@ here=$(dirname "$0") -project_home=$(cd "$here" && cd .. && echo "$PWD") +# assume we are called from the project home +project_home=$PWD if [ -x "$(command -v python3)" ]; then python="python3"