forked from 0k/0k-charms
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
839 B
26 lines
839 B
# -*- mode: shell-script -*-
|
|
|
|
get_odoo_uid() {
|
|
uid_label="odoo"
|
|
odoo_uid=$(cached_cmd_on_base_image "$SERVICE_NAME" "id -u \"$uid_label\"") || {
|
|
debug "Failed to query for '$uid_label' uid in ${DARKYELLOW}$SERVICE_NAME${NORMAL} base image."
|
|
return 1
|
|
}
|
|
info "openerp uid from ${DARKYELLOW}$SERVICE_NAME${NORMAL} is '$odoo_uid'"
|
|
echo "$odoo_uid"
|
|
}
|
|
|
|
get_odoo_version() {
|
|
local odoo_version
|
|
odoo_version=$(cached_cmd_on_base_image "$SERVICE_NAME" \
|
|
"python -c 'import odoo; print(odoo.cli.server.__version__)'"
|
|
) || {
|
|
debug "Failed to query for odoo version in ${DARKYELLOW}$SERVICE_NAME${NORMAL} base image."
|
|
return 1
|
|
}
|
|
info "odoo version from ${DARKYELLOW}$SERVICE_NAME${NORMAL} is '$odoo_version'"
|
|
echo "${odoo_version%%.*}"
|
|
}
|
|
export -f get_odoo_version
|
|
|
|
|