# HG changeset patch # User Vincent Hatakeyama <vincent.hatakeyama@xcg-consulting.fr> # Date 1470059320 -7200 # Mon Aug 01 15:48:40 2016 +0200 # Node ID b18984ad1cc4d720f45470faeb13a05477c87cbf # Parent 2d61c36aae0dd066975d1d1707c040cc3fedbaee fix default value get and add a WIP ignore for git diff --git a/docker_build b/docker_build --- a/docker_build +++ b/docker_build @@ -1,20 +1,22 @@ #!/bin/zsh # template version 2.7 -repository=$(python -B -c "import ConfigParser ; c = ConfigParser.ConfigParser() ; c.read('${project_home}/setup.cfg') ; print c.get('odoo_scripts', 'repository', 'dockerhub.xcg.io')") # TODO add a way to bypass the value, maybe with a key in the setup.cfg file project_home=$(dirname $0)/.. +repository=$(python -B -c "import ConfigParser ; c = ConfigParser.SafeConfigParser() ; c.read('${project_home}/setup.cfg') ; print (c.has_section('odoo_scripts') and c.has_option('odoo_scripts', 'repository') and c.get('odoo_scripts', 'repository')) or 'dockerhub.xcg.io'") +echo $repository image=$(basename $(readlink -f $project_home)) +ignore_git=true pushd $project_home # Ensureconf -hg cfensureconf || { echo 'hg cfensureconf failed' ; popd ; exit 1; } +hg cfensureconf || $ignore_git || { echo 'hg cfensureconf failed' ; popd ; exit 1; } popd # Grab latest base image -ODOO_TYPE=$(python -B -c "import ConfigParser ; c = ConfigParser.ConfigParser() ; c.read('${project_home}/setup.cfg') ; print c.get('odoo_scripts', 'odoo_type', 'odoo8')") +ODOO_TYPE=$(python -B -c "import ConfigParser ; c = ConfigParser.SafeConfigParser() ; c.read('${project_home}/setup.cfg') ; print (c.has_section('odoo_scripts') and c.has_option('odoo_scripts', 'odoo_type') and c.get('odoo_scripts', 'odoo_type')) or 'odoo8'") if [ "$ODOO_TYPE" = "odoo8" ]; then