Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes a bash syntax error with BUILD_RESTRICT_LANG and some English #16

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 12.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM ghcr.io/acsone/odoo-bedrock:12.0-py37-latest
MAINTAINER Akretion
LABEL maintainer=Akretion

# syntax = docker/dockerfile:1.4

Expand Down
2 changes: 1 addition & 1 deletion 13.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM ghcr.io/acsone/odoo-bedrock:13.0-py37-latest
MAINTAINER Akretion
LABEL maintainer=Akretion

# syntax = docker/dockerfile:1.4

Expand Down
2 changes: 1 addition & 1 deletion 14.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM ghcr.io/acsone/odoo-bedrock:14.0-py38-latest
MAINTAINER Akretion
LABEL maintainer=Akretion

# syntax = docker/dockerfile:1.4

Expand Down
2 changes: 1 addition & 1 deletion 15.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM ghcr.io/acsone/odoo-bedrock:15.0-py38-latest
MAINTAINER Akretion
LABEL maintainer=Akretion

# syntax = docker/dockerfile:1.4

Expand Down
2 changes: 1 addition & 1 deletion 16.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# python 3.10 is the default used in acsone
FROM ghcr.io/acsone/odoo-bedrock:16.0-py310-latest
MAINTAINER Akretion
LABEL maintainer=Akretion

# syntax = docker/dockerfile:1.4

Expand Down
6 changes: 3 additions & 3 deletions bin/ak-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export DB_NAME=${PGDATABASE}


if [ -z "$(pip list --format=columns | grep "/odoo/src")" ]; then
# The build runs 'pip install -e' on the odoo src, which creates an
# The build runs 'pip install -e' on the odoo/src directory, which creates an
# odoo.egg-info directory *inside /odoo/src*. So when we run a container
# with a volume shared with the host, we don't have this .egg-info (at least
# the first time).
Expand All @@ -30,7 +30,7 @@ if [ -z "$(pip list --format=columns | grep "/odoo/src")" ]; then
chown -R $USER_ID:$USER_ID /odoo/src/*.egg-info
fi

# Do not block the entrypoint if the pip install fail (only local case)
# so we only exist if fail after the pip install
# Do not block the entrypoint if pip install fails (only local case)
# so we only exit in case of a failure after pip install
set -Eeuo pipefail
/usr/local/bin/entrypoint.sh "$@"
9 changes: 4 additions & 5 deletions install/build-odoo
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@ ak build -c odoo-spec.yaml -f odoo-frozen.yaml
# Remove useless git directory
rm -rf /odoo/src/.git

# Keep only wanted odoo module if defined
# First, we eventually keep only the wanted odoo modules
if [ -z "$(ls -A /odoo/links)" ]; then
echo "No module specify, display all"
echo "No addons set specified, keeping all addons"
else
cp -r -L /odoo/links /odoo/odoo-addons
rm -rf /odoo/src/addons/*
mv /odoo/odoo-addons/* /odoo/src/addons
fi

# Secondly we remove unwanted lang
if [[ BUILD_RESTRICT_LANG ]]
then
# Second, we remove unwanted lang
if [[ -n "$BUILD_RESTRICT_LANG" ]]; then
find /odoo/src/ -name *.po ! -name $BUILD_RESTRICT_LANG -type f -exec rm -v {} +
fi