Skip to content
Snippets Groups Projects
Commit b18984ad1cc4 authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

fix default value get and add a WIP ignore for git

parent 2d61c36aae0d
No related branches found
No related tags found
No related merge requests found
#!/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)/..
......@@ -5,3 +4,5 @@
# 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))
......@@ -7,5 +8,6 @@
image=$(basename $(readlink -f $project_home))
ignore_git=true
pushd $project_home
# Ensureconf
......@@ -8,9 +10,9 @@
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
......@@ -13,8 +15,8 @@
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment