2026-02-15 01:07:25 -05:00
|
|
|
|
2020-07-05 22:38:14 -04:00
|
|
|
# Release
|
2020-12-11 03:46:56 -05:00
|
|
|
|
2020-09-30 20:49:35 -04:00
|
|
|
A guide on how to generate a release.
|
2020-07-05 22:38:14 -04:00
|
|
|
|
2021-07-20 16:19:01 -04:00
|
|
|
## Clean environment before generating new release
|
2020-12-11 03:46:56 -05:00
|
|
|
|
2021-07-20 20:14:24 -04:00
|
|
|
Before the cleaning, check if existing file isn't committed, not pushed or in stash.
|
2021-07-20 00:31:15 -04:00
|
|
|
|
2021-07-16 18:56:58 -04:00
|
|
|
```bash
|
2025-05-05 04:43:13 -04:00
|
|
|
.venv.erplibre/bin/repo forall -pc "git stash list"
|
2023-01-02 20:33:57 -05:00
|
|
|
./script/git/git_show_code_diff_repo_manifest.py
|
2021-07-16 18:56:58 -04:00
|
|
|
```
|
|
|
|
|
|
2021-07-20 16:19:01 -04:00
|
|
|
This will erase everything in addons. Useful before creating docker, manifest and do a release.
|
2020-12-11 03:46:56 -05:00
|
|
|
|
|
|
|
|
```bash
|
2023-01-02 20:33:57 -05:00
|
|
|
./script/git/clean_repo_manifest.sh
|
2020-12-11 03:46:56 -05:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
And update all from dev to merge into prod.
|
|
|
|
|
|
2025-04-13 04:08:57 -04:00
|
|
|
Test all supported Odoo version :
|
|
|
|
|
|
2020-12-11 03:46:56 -05:00
|
|
|
```bash
|
2025-04-13 04:08:57 -04:00
|
|
|
make install_odoo_all_version
|
2020-12-11 03:46:56 -05:00
|
|
|
```
|
|
|
|
|
|
2021-07-20 00:31:15 -04:00
|
|
|
## Validate environment
|
|
|
|
|
|
2025-04-13 04:08:57 -04:00
|
|
|
- Check if each manifest version like [manifest/default.dev.odoo16.0.xml](../manifest/default.dev.odoo16.0.xml) is ready for production.
|
2021-07-20 20:14:24 -04:00
|
|
|
- Run test :
|
|
|
|
|
|
|
|
|
|
```bash
|
2022-10-05 02:06:37 -04:00
|
|
|
make test_full_fast
|
2021-07-20 20:14:24 -04:00
|
|
|
```
|
2021-07-20 00:31:15 -04:00
|
|
|
|
2021-07-20 20:00:41 -04:00
|
|
|
### Format code
|
|
|
|
|
|
2021-07-20 20:14:24 -04:00
|
|
|
To format all code, run:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
make format
|
|
|
|
|
```
|
2021-07-20 20:00:41 -04:00
|
|
|
|
2021-07-20 16:39:57 -04:00
|
|
|
### Update documentations
|
|
|
|
|
|
2021-07-20 20:14:24 -04:00
|
|
|
To generate Markdown in directory `./doc`, run:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
make doc_markdown
|
|
|
|
|
```
|
2021-07-01 03:37:25 -04:00
|
|
|
|
2021-07-20 00:31:15 -04:00
|
|
|
### Test docker generate
|
|
|
|
|
|
2021-07-20 20:14:24 -04:00
|
|
|
To generate a docker, run:
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-02-16 10:30:53 -05:00
|
|
|
make docker_build_odoo_18
|
2021-07-20 20:14:24 -04:00
|
|
|
```
|
2021-07-01 03:37:25 -04:00
|
|
|
|
2021-09-27 23:29:13 -04:00
|
|
|
### Rename old version to new version
|
|
|
|
|
|
|
|
|
|
Search old version, like :
|
2022-03-03 14:35:23 -05:00
|
|
|
|
2021-09-27 23:29:13 -04:00
|
|
|
```bash
|
[ADD] release : publier 1.8.0, section de changelog et version déclarée
Les 39 puces du non-publié décrivent du travail fini qu'aucun numéro ne
permettait de citer. La section 1.8.0 les porte, avec la note de migration que
réclament le choix de l'interpréteur Python et le retrait d'Ubuntu 20.04 et
22.04. La version déclarée suit, comme le veut doc/RELEASE.base.md : le
fichier semver que lit env_var.sh, les huit pyproject, npm, CLAUDE.md et la
note des versions supportées. La ligne de contracts/compatibility.json reste
en 1.7.0, elle atteste un appariement mobile éprouvé et non la version
courante. Le commentaire de todo.py ne nomme plus de version, celle du dépôt
étant marquée « default » dans le fichier des versions supportées.
Vérifié : ERPLIBRE_VERSION=1.8.0, parité 17/8/10/2/2, tests de version verts.
--- EN ---
The unreleased list's 39 entries describe finished work no number could cite.
The 1.8.0 section carries them, with the migration note that choosing the
Python interpreter and dropping Ubuntu 20.04 and 22.04 call for. The declared
version follows, as doc/RELEASE.base.md wants: the semver file env_var.sh
reads, the eight pyproject files, npm, CLAUDE.md and the supported-version
note. The contracts/compatibility.json row stays at 1.7.0, attesting a tested
mobile pairing and not the current version. The todo.py comment names no
version any more, the repository's own being marked « default » in the
supported-version file. Checked: ERPLIBRE_VERSION=1.8.0, 17/8/10/2/2 parity,
version tests green.
Assisted-by: Claude Opus 5
2026-09-04 05:57:20 -04:00
|
|
|
grep --color=always --exclude-dir={.repo,.venv,.git} --exclude="*.svg" -nri v1.8.0
|
2021-09-27 23:29:13 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Replace if need it to new version.
|
|
|
|
|
|
2022-01-24 14:03:38 -05:00
|
|
|
Update file `./pyproject.toml` in [tool.poetry], line `version =`.
|
|
|
|
|
|
2021-07-20 02:56:14 -04:00
|
|
|
### Test production Ubuntu environment
|
|
|
|
|
|
2021-07-20 16:07:22 -04:00
|
|
|
Follow instructions in [PRODUCTION.md](./PRODUCTION.md).
|
|
|
|
|
|
|
|
|
|
Test installation with code generator Geomap:
|
2021-07-20 20:14:24 -04:00
|
|
|
|
2021-07-20 16:07:22 -04:00
|
|
|
```bash
|
|
|
|
|
make addons_install_code_generator_full
|
|
|
|
|
```
|
2021-07-20 02:56:14 -04:00
|
|
|
|
2022-10-05 02:06:37 -04:00
|
|
|
### Update image_db
|
|
|
|
|
|
|
|
|
|
To generate database images in directory `./image_db`, run:
|
|
|
|
|
|
|
|
|
|
```bash
|
2022-10-05 23:54:41 -04:00
|
|
|
make db_clean_cache
|
2022-10-05 02:06:37 -04:00
|
|
|
make config_gen_all
|
2023-07-07 02:35:46 -04:00
|
|
|
make image_db_create_all_parallel
|
2022-10-05 02:06:37 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
To test it, you need to clean caches and install it:
|
|
|
|
|
|
|
|
|
|
```bash
|
2023-01-02 20:33:57 -05:00
|
|
|
./script/database/db_restore.py --clean_cache
|
|
|
|
|
./script/database/db_restore.py --database test --image erplibre_website
|
2022-10-05 02:06:37 -04:00
|
|
|
```
|
|
|
|
|
|
2020-12-11 03:46:56 -05:00
|
|
|
## Generate new prod and release
|
|
|
|
|
|
|
|
|
|
Generate production manifest and freeze all repos versions.
|
|
|
|
|
|
2020-07-05 22:38:14 -04:00
|
|
|
```bash
|
2025-05-05 04:43:13 -04:00
|
|
|
.venv.erplibre/bin/repo manifest -r -o ./default.xml
|
2020-07-05 22:38:14 -04:00
|
|
|
```
|
2020-12-11 03:46:56 -05:00
|
|
|
|
2022-03-03 14:35:23 -05:00
|
|
|
Update ERPLIBRE_VERSION variable in [env_var.sh](../env_var.sh), [Dockerfile.prod](../docker/Dockerfile.prod.pkg)
|
|
|
|
|
and [docker-compose](../docker-compose.yml).
|
2020-12-11 03:46:56 -05:00
|
|
|
|
|
|
|
|
Generate [poetry](./POETRY.md) and keep only missing dependencies, remove updates.
|
2021-07-20 00:31:15 -04:00
|
|
|
|
2020-07-05 22:38:14 -04:00
|
|
|
```bash
|
2023-01-02 20:33:57 -05:00
|
|
|
./script/poetry/poetry_update.py
|
2020-07-05 22:38:14 -04:00
|
|
|
```
|
|
|
|
|
|
2023-01-02 20:33:57 -05:00
|
|
|
When running script ./script/poetry/poetry_update.py, note manually inserted dependencies, stash all changes and add it
|
|
|
|
|
manually.
|
2021-07-20 00:31:15 -04:00
|
|
|
|
2020-12-11 03:46:56 -05:00
|
|
|
```bash
|
|
|
|
|
poetry add DEPENDENCY
|
|
|
|
|
```
|
2020-09-29 19:37:21 -04:00
|
|
|
|
2020-12-11 03:46:56 -05:00
|
|
|
Understand differences from last release:
|
2020-09-29 19:37:21 -04:00
|
|
|
|
2020-12-11 03:46:56 -05:00
|
|
|
```bash
|
|
|
|
|
# Get all differences between the last tag and HEAD, to update the CHANGELOG.md
|
|
|
|
|
# ERPLibre
|
|
|
|
|
git diff v#.#.#..HEAD
|
|
|
|
|
|
|
|
|
|
# All repo
|
2025-05-05 04:43:13 -04:00
|
|
|
.venv.erplibre/bin/repo forall -pc "git diff ERPLibre/v#.#.#..HEAD"
|
2020-12-11 03:46:56 -05:00
|
|
|
```
|
|
|
|
|
|
2021-07-01 03:18:56 -04:00
|
|
|
Simplification tools:
|
2021-07-20 00:31:15 -04:00
|
|
|
|
2021-07-01 03:18:56 -04:00
|
|
|
```bash
|
2021-07-16 00:13:05 -04:00
|
|
|
# Show all divergence repository with production
|
|
|
|
|
make repo_diff_manifest_production
|
2022-01-24 23:38:34 -05:00
|
|
|
# Short version with statistics
|
2021-07-01 03:18:56 -04:00
|
|
|
make repo_diff_stat_from_last_version
|
|
|
|
|
# Long version
|
|
|
|
|
make repo_diff_from_last_version
|
|
|
|
|
```
|
|
|
|
|
|
2020-12-11 03:46:56 -05:00
|
|
|
Update file [CHANGELOG.md](../CHANGELOG.md) and create a section with new version, use next command to read all changes.
|
|
|
|
|
|
|
|
|
|
Create a branch release/#.#.# and create a pull request to branch master with your commit:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
git commit -am "Release v#.#.#"
|
|
|
|
|
```
|
|
|
|
|
|
2021-09-27 23:29:13 -04:00
|
|
|
Review by your peers, test the docker file and **merge to master**.
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
git checkout master
|
|
|
|
|
git merge --no-ff RELEASE_BRANCH
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Add comment `Release v#.#.#`.
|
2020-12-11 03:46:56 -05:00
|
|
|
|
|
|
|
|
## Create tag
|
2020-07-06 01:31:21 -04:00
|
|
|
|
2020-09-30 20:49:35 -04:00
|
|
|
Add a tag on the commit in branch master with your release. When adding tag, be sure to update default.xml
|
2020-12-11 03:46:56 -05:00
|
|
|
|
2020-07-11 05:12:47 -04:00
|
|
|
```bash
|
|
|
|
|
git tag v#.#.#
|
|
|
|
|
# Push your tags
|
|
|
|
|
git push --tags
|
2020-07-11 21:13:44 -04:00
|
|
|
# Add tags for all repo
|
2025-05-05 04:43:13 -04:00
|
|
|
.venv.erplibre/bin/repo forall -pc "git tag ERPLibre/v#.#.#"
|
2021-07-16 00:56:30 -04:00
|
|
|
make tag_push_all
|
2020-07-11 05:12:47 -04:00
|
|
|
```
|
2020-07-11 21:13:44 -04:00
|
|
|
|
2020-12-11 03:46:56 -05:00
|
|
|
## Generate and push docker
|
|
|
|
|
|
|
|
|
|
Important to generate container after push git tags, otherwise the git version will be wrong.
|
|
|
|
|
|
2020-11-20 23:54:44 -05:00
|
|
|
When building your docker with script
|
2021-06-30 22:26:20 -04:00
|
|
|
> make docker_build_release
|
2020-11-20 23:54:44 -05:00
|
|
|
|
|
|
|
|
List your docker version
|
2020-12-12 01:15:23 -05:00
|
|
|
> docker images
|
2020-11-20 23:54:44 -05:00
|
|
|
|
|
|
|
|
You need to push your docker image and update your tag, like 1.0.1:
|
|
|
|
|
> docker push technolibre/erplibre:VERSION
|
2020-10-03 01:36:29 -04:00
|
|
|
|
2022-01-24 14:03:38 -05:00
|
|
|
## Do a release on github
|
|
|
|
|
|
2022-03-03 14:35:23 -05:00
|
|
|
Visit `https://github.com/ERPLibre/ERPLibre/releases/new` and create a release named `v#.#.#` and copy information from
|
|
|
|
|
CHANGELOG.md.
|
2022-01-24 14:03:38 -05:00
|
|
|
|
2020-07-05 22:38:14 -04:00
|
|
|
# TIPS
|
2020-12-11 03:46:56 -05:00
|
|
|
|
2020-09-30 20:49:35 -04:00
|
|
|
## Compare repo differences with another ERPLibre project
|
2020-12-11 03:46:56 -05:00
|
|
|
|
|
|
|
|
To generate a list of differences between repo git commit
|
|
|
|
|
|
2020-07-05 22:38:14 -04:00
|
|
|
```bash
|
2023-01-02 20:33:57 -05:00
|
|
|
./script/git/git_change_remote.py --sync_to /path/to/directory
|
2021-07-20 16:19:01 -04:00
|
|
|
```
|
2023-01-12 16:09:27 -05:00
|
|
|
|
|
|
|
|
## Semantic versioning
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
<valid semver> ::= <version core> "-" <pre-release> "+" <build>
|
2026-02-15 01:07:25 -05:00
|
|
|
```
|