Skip to content
Merged
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
83 changes: 83 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: CI

on:
push:
branches:
- '**'
tags-ignore:
- '**'

jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install shellcheck
run: sudo apt-get install -y shellcheck
- name: Run shellcheck
run: shellcheck -s bash -x -a --color -e "SC1090,SC1091,SC2034" ./bin/* ./lib/*.bash

flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install flake8
run: pip install flake8
- name: Run flake8
run: flake8 ./lib/pylib/

test-py2:
runs-on: ubuntu-22.04
env:
CI_RUN: '1'
ODOO_HELPER_INSTALL_PATH: ${{ github.workspace }}
TEST_TMP_DIR: /tmp/odoo-helper-tests
DEBIAN_FRONTEND: noninteractive
ALWAYS_ANSWER_YES: '1'
LANG: C.UTF-8
LC_ALL: C.UTF-8
LANGUAGE: C.UTF-8
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Setup locale and git
run: |
sudo apt-get update -qq && sudo apt-get install -yqq locales git
sudo update-locale LANG=C.UTF-8 LC_ALL=C.UTF-8 LANGUAGE=C.UTF-8
git config --global user.email "test-oh@test.test"
git config --global user.name "test-oh"
- name: Install odoo-helper-scripts
run: sudo -E bash install-system.bash
- name: Run py2 tests (Odoo 8/9/10)
run: bash tests/test_py2.bash

test-py3:
runs-on: ubuntu-${{ matrix.ubuntu }}
strategy:
fail-fast: false
matrix:
ubuntu: ['22.04', '24.04']
env:
CI_RUN: '1'
ODOO_HELPER_INSTALL_PATH: ${{ github.workspace }}
TEST_TMP_DIR: /tmp/odoo-helper-tests
DEBIAN_FRONTEND: noninteractive
ALWAYS_ANSWER_YES: '1'
LANG: C.UTF-8
LC_ALL: C.UTF-8
LANGUAGE: C.UTF-8
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Setup locale and git
run: |
sudo apt-get update -qq && sudo apt-get install -yqq locales git
sudo update-locale LANG=C.UTF-8 LC_ALL=C.UTF-8 LANGUAGE=C.UTF-8
git config --global user.email "test-oh@test.test"
git config --global user.name "test-oh"
- name: Install odoo-helper-scripts
run: sudo -E bash install-system.bash
- name: Run py3 tests (Odoo 11–18)
run: bash tests/test_py3.bash
37 changes: 37 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy Docs to GitHub Pages

on:
push:
branches:
- master

permissions:
pages: write
id-token: write

jobs:
deploy-docs:
runs-on: ubuntu-20.04
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
env:
ODOO_HELPER_INSTALL_PATH: ${{ github.workspace }}
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install system dependencies
run: sudo apt-get install -y python3-pip && sudo -E bash install-system.bash
- name: Install MkDocs
run: python3 -m pip install mkdocs mkdocs-cinder==0.14.0
- name: Build docs
run: bash scripts/build_docs.bash
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: public
- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v4
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Release

on:
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
build-package:
runs-on: ubuntu-22.04
env:
ODOO_HELPER_ROOT: ${{ github.workspace }}
ODOO_HELPER_BIN: ${{ github.workspace }}/bin
ODOO_HELPER_LIB: ${{ github.workspace }}/lib
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install build dependencies
run: sudo apt-get install -qqy ruby ruby-dev make gcc curl
- name: Install fpm
run: sudo gem install fpm
- name: Build .deb package
run: bash scripts/build_packages.bash
- name: Upload .deb artifact
uses: actions/upload-artifact@v4
with:
name: deb-package
path: build/odoo-helper-scripts.deb

create-release:
runs-on: ubuntu-latest
needs: build-package
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v6
- name: Download .deb artifact
uses: actions/download-artifact@v4
with:
name: deb-package
path: build/
- name: Extract release notes from CHANGELOG
run: |
sudo apt-get install -y coreutils
csplit --prefix=CHANGELOG. --suffix=%02d.md CHANGELOG.md '/---/'
- name: Create GitHub Release
run: |
gh release create "$GITHUB_REF_NAME" \
--title "$GITHUB_REF_NAME" \
--notes-file CHANGELOG.00.md \
build/odoo-helper-scripts.deb
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
/docs/release-notes.md
/docs/contributing.md
/docs/command-reference.md
/CLAUDE.md
174 changes: 0 additions & 174 deletions .gitlab-ci.yml

This file was deleted.

7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Odoo helper scripts collection

| Master | [![pipeline status](https://gitlab.com/katyukha/odoo-helper-scripts/badges/master/pipeline.svg)](https://gitlab.com/katyukha/odoo-helper-scripts/commits/master) | [![coverage report](https://gitlab.com/katyukha/odoo-helper-scripts/badges/master/coverage.svg)](https://gitlab.com/katyukha/odoo-helper-scripts/commits/master)| [![CHANGELOG](https://img.shields.io/badge/CHANGELOG-master-brightgreen.svg)](https://gitlab.com/katyukha/odoo-helper-scripts/blob/master/CHANGELOG.md) |
| ------------- |:---------------|:--------------|:------------|
| Dev | [![pipeline status](https://gitlab.com/katyukha/odoo-helper-scripts/badges/dev/pipeline.svg)](https://gitlab.com/katyukha/odoo-helper-scripts/commits/dev) | [![coverage report](https://gitlab.com/katyukha/odoo-helper-scripts/badges/dev/coverage.svg)](https://gitlab.com/katyukha/odoo-helper-scripts/commits/dev) | [![CHANGELOG](https://img.shields.io/badge/CHANGELOG-dev-yellow.svg)](https://gitlab.com/katyukha/odoo-helper-scripts/blob/dev/CHANGELOG.md) |
| Branch | CI Status | CHANGELOG |
| ------ |:----------|:----------|
| master | [![CI](https://github.com/katyukha/odoo-helper-scripts/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/katyukha/odoo-helper-scripts/actions/workflows/ci.yml?query=branch%3Amaster) | [![CHANGELOG](https://img.shields.io/badge/CHANGELOG-master-brightgreen.svg)](https://github.com/katyukha/odoo-helper-scripts/blob/master/CHANGELOG.md) |
| dev | [![CI](https://github.com/katyukha/odoo-helper-scripts/actions/workflows/ci.yml/badge.svg?branch=dev)](https://github.com/katyukha/odoo-helper-scripts/actions/workflows/ci.yml?query=branch%3Adev) | [![CHANGELOG](https://img.shields.io/badge/CHANGELOG-dev-yellow.svg)](https://github.com/katyukha/odoo-helper-scripts/blob/dev/CHANGELOG.md) |

## Overview

Expand Down
9 changes: 8 additions & 1 deletion lib/addons.bash
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,14 @@ function addons_install_update_internal {
local todo_addons;
todo_addons=$(join_by , "$@");

local odoo_options=( "-d" "$db" "--max-cron-threads=0" "--stop-after-init" "--no-xmlrpc" "--pidfile=/dev/null" );
local odoo_options=( "-d" "$db" "--max-cron-threads=0" "--stop-after-init" "--pidfile=/dev/null" );

if [ "$(odoo_get_major_version)" -lt 11 ]; then
odoo_options+=( "--no-xmlrpc" );
else
odoo_options+=( "--no-http" );
fi

if ! odoo_db_is_demo_enabled -q "$db"; then
odoo_options+=( "--without-demo=all" );
fi
Expand Down
Loading