generate.sh: added ability to generate a single release.
This commit is contained in:
parent
e34858bb90
commit
603f632bdc
35
generate.sh
35
generate.sh
@ -3,11 +3,20 @@
|
|||||||
#
|
#
|
||||||
# Generate Odoo release specific Dockerfiles.
|
# Generate Odoo release specific Dockerfiles.
|
||||||
#
|
#
|
||||||
|
# usage:
|
||||||
|
# # all
|
||||||
|
# bash generate.sh
|
||||||
|
#
|
||||||
|
# # single release
|
||||||
|
# bash generate.sh 20161230
|
||||||
|
#
|
||||||
# author: Pedro Salgado <steenzout@ymail.com>
|
# author: Pedro Salgado <steenzout@ymail.com>
|
||||||
# version: 1.0
|
# version: 1.0
|
||||||
#
|
#
|
||||||
# #####
|
# #####
|
||||||
|
|
||||||
|
ARG_RELEASE="${1}"
|
||||||
|
|
||||||
for ODOO_VERSION in 8.0 9.0 10.0
|
for ODOO_VERSION in 8.0 9.0 10.0
|
||||||
do
|
do
|
||||||
|
|
||||||
@ -18,26 +27,30 @@ do
|
|||||||
ODOO_RELEASE="${line_array[0]}"
|
ODOO_RELEASE="${line_array[0]}"
|
||||||
ODOO_SHA1SUM="${line_array[1]}"
|
ODOO_SHA1SUM="${line_array[1]}"
|
||||||
|
|
||||||
mkdir -p "${ODOO_VERSION}/${ODOO_RELEASE}" || true
|
if [[ "${ARG_RELEASE}" == "" || "${ARG_RELEASE}" == "${ODOO_RELEASE}" ]]; then
|
||||||
|
|
||||||
echo "generating ${ODOO_VERSION}/${ODOO_RELEASE}/vars.env..."
|
mkdir -p "${ODOO_VERSION}/${ODOO_RELEASE}" || true
|
||||||
eval "cat > ${ODOO_VERSION}/${ODOO_RELEASE}/vars.env << EOF
|
|
||||||
|
echo "generating ${ODOO_VERSION}/${ODOO_RELEASE}/vars.env..."
|
||||||
|
eval "cat > ${ODOO_VERSION}/${ODOO_RELEASE}/vars.env << EOF
|
||||||
ODOO_RELEASE=${ODOO_RELEASE}
|
ODOO_RELEASE=${ODOO_RELEASE}
|
||||||
ODOO_SHA1SUM=${ODOO_SHA1SUM}
|
ODOO_SHA1SUM=${ODOO_SHA1SUM}
|
||||||
ODOO_VERSION=${ODOO_VERSION}
|
ODOO_VERSION=${ODOO_VERSION}
|
||||||
EOF"
|
EOF"
|
||||||
|
|
||||||
echo "generating ${ODOO_VERSION}/${ODOO_RELEASE}/Dockerfile..."
|
echo "generating ${ODOO_VERSION}/${ODOO_RELEASE}/Dockerfile..."
|
||||||
source "${ODOO_VERSION}/${ODOO_RELEASE}/vars.env"
|
source "${ODOO_VERSION}/${ODOO_RELEASE}/vars.env"
|
||||||
eval "cat > ${ODOO_VERSION}/${ODOO_RELEASE}/Dockerfile << EOF
|
eval "cat > ${ODOO_VERSION}/${ODOO_RELEASE}/Dockerfile << EOF
|
||||||
$(cat ${ODOO_VERSION}/Dockerfile.release)
|
$(cat ${ODOO_VERSION}/Dockerfile.release)
|
||||||
EOF"
|
EOF"
|
||||||
|
|
||||||
cp "${ODOO_VERSION}/entrypoint.sh" "${ODOO_VERSION}/${ODOO_RELEASE}/"
|
cp "${ODOO_VERSION}/entrypoint.sh" "${ODOO_VERSION}/${ODOO_RELEASE}/"
|
||||||
if [ "${ODOO_VERSION}" == '10.0' ]; then
|
if [ "${ODOO_VERSION}" == '10.0' ]; then
|
||||||
cp 10.0/odoo.conf "${ODOO_VERSION}/${ODOO_RELEASE}/"
|
cp 10.0/odoo.conf "${ODOO_VERSION}/${ODOO_RELEASE}/"
|
||||||
else
|
else
|
||||||
cp "${ODOO_VERSION}/openerp-server.conf" "${ODOO_VERSION}/${ODOO_RELEASE}/"
|
cp "${ODOO_VERSION}/openerp-server.conf" "${ODOO_VERSION}/${ODOO_RELEASE}/"
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user