From 38954802cc535021430f8ba934b16822969073d0 Mon Sep 17 00:00:00 2001 From: Pedro Salgado Date: Fri, 30 Dec 2016 19:38:49 -0700 Subject: [PATCH] build.sh: added ability to build a single release. --- build.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index 224c606..4c37460 100755 --- a/build.sh +++ b/build.sh @@ -3,11 +3,20 @@ # # Build Odoo 8.0/9.0/10.0 base+release docker container images. # +# usage: +# # all +# bash build.sh +# +# # single version +# bash build.sh 20161230 +# # author: Pedro Salgado # version: 1.0 # # ##### +ARG_RELEASE="${1}" + for ODOO_VERSION in 8.0 9.0 10.0 do @@ -21,11 +30,16 @@ do ODOO_RELEASE="${line_array[0]}" ODOO_SHA1SUM="${line_array[1]}" - echo "building steenzout/odoo:${ODOO_VERSION}.${ODOO_RELEASE}..." + echo "'${ARG_RELEASE}' == '${ODOO_RELEASE}'" - cd "${ODOO_VERSION}/${ODOO_RELEASE}/" - docker build -t "steenzout/odoo:${ODOO_VERSION}.${ODOO_RELEASE}" -f "Dockerfile" . - cd ../../ + if [[ "${ARG_RELEASE}" == "" || "${ARG_RELEASE}" == "${ODOO_RELEASE}" ]]; then + + echo "building steenzout/odoo:${ODOO_VERSION}.${ODOO_RELEASE}..." + cd "${ODOO_VERSION}/${ODOO_RELEASE}/" + docker build -t "steenzout/odoo:${ODOO_VERSION}.${ODOO_RELEASE}" -f "Dockerfile" . + cd ../../ + + fi done done