Skip to content

Commit

Permalink
added build-odoo script
Browse files Browse the repository at this point in the history
  • Loading branch information
rvalyi committed Aug 15, 2023
1 parent 0718972 commit 22460de
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 14.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ RUN pip install git+https://github.com/akretion/ak
COPY repos.yml /root/.config/git-autoshare/repos.yml
RUN pip install git-autoshare git-aggregator
COPY bin/* /usr/local/bin/
COPY install/* /install/

# pre-fetch the git-autoshare cache with the bare minimum:
ADD https://api.github.com/repos/odoo/odoo/git/refs/heads/14.0 version.json
RUN mkdir -p /root/.cache/git-autoshare/github.com/odoo && \
cd /root/.cache/git-autoshare/github.com/odoo && \
Expand Down
25 changes: 25 additions & 0 deletions install/build-odoo
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
set -e
cd /odoo

ak build -j1 -c odoo-spec.yaml -f odoo-frozen.yaml
echo "AK BUILD DONE"
# Clean useless file

# Remove useless git directory
rm -rf /odoo/src/.git

# First, we eventually keep only the wanted odoo modules
if [ -z "$(ls -A /odoo/links)" ]; then
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

# 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

0 comments on commit 22460de

Please sign in to comment.