Skip to content

Commit

Permalink
[IMP] 1.1.0: Improve generated commit message + minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloEForgeFlow committed Mar 20, 2023
1 parent bc53f6a commit 9a5fe94
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ addons **addons.yml** format.

# Installation

- Via `pipx` with `pipx install odoo-filter-addons`
- Via `pipx` with `pipx install odoo-filter-addons` (recommended)
- Via `pip` with `python3 -m pip install odoo-filter-addons`
- After cloning locally with `python3 -m pip install .`

Expand Down
2 changes: 1 addition & 1 deletion odoo_filter_addons/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from .main import cli_main
__version__ = "1.0.2"
from .version import __version__
7 changes: 5 additions & 2 deletions odoo_filter_addons/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
from plumbum.commands.processes import ProcessExecutionError
from git_aggregator.main import main as gitaggregate

from .version import __version__

#####################################################################

class UserException(Exception):
Expand Down Expand Up @@ -98,8 +100,9 @@ def filter_repos(output_path, tmp_path, repos, addons, push, gitlab_ci):
messages.append(repo_message)
print_header("Finished filtering", '*')
# Commit changes, if any, and push them to remote if specified
message = "\n".join(filter(None, messages))
if message and git["diff", "--staged", "--quiet"] & TF(1):
if filter(None, messages) and git["diff", "--staged", "--quiet"] & TF(1):
messages = [f"[AUTO] {__package__} {__version__}"] + messages
message = "\n".join(messages)
git("commit", "-m", message)
print("Changes commited")
if push:
Expand Down
1 change: 1 addition & 0 deletions odoo_filter_addons/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "1.1.0"
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[project]
name = "odoo_filter_addons"
description = "Simple utlity to filter odoo addons into a single directory"
readme = "README.md"
authors = [
{ name="Pablo Esteban", email="[email protected]" },
]
Expand All @@ -27,4 +28,4 @@ build-backend = "setuptools.build_meta"
[tool.setuptools]
packages = ["odoo_filter_addons"]
[tool.setuptools.dynamic]
version = {attr = "odoo_filter_addons.__version__"}
version = {attr = "odoo_filter_addons.version.__version__"}

0 comments on commit 9a5fe94

Please sign in to comment.