Skip to content
Snippets Groups Projects
Commit 7caefd33faeb authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:pencil: store version in __version__

parent 60350f857f14
No related branches found
No related tags found
1 merge request!7docker-pg
__version__ = "4.2.1"
__author__ = "XCG Consulting"
# expose some useful functions # expose some useful functions
from .odoo import odoo_connect_parser, odoo_login # noqa: F401 from .odoo import odoo_connect_parser, odoo_login # noqa: F401
from .parsing import logging_from_verbose # noqa: F401 from .parsing import logging_from_verbose # noqa: F401
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
# vim: set shiftwidth=4 softtabstop=4: # vim: set shiftwidth=4 softtabstop=4:
"""Script to run test with local modules """Script to run test with local modules
""" """
# Version 4.2.1
import logging import logging
import os import os
import sys import sys
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
# vim: set shiftwidth=4 softtabstop=4: # vim: set shiftwidth=4 softtabstop=4:
"""Script to locally build a docker image """Script to locally build a docker image
""" """
# Version 4.2.1
import datetime import datetime
import json import json
import logging import logging
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
"""Launch a docker image but bind the local directory inside the container """Launch a docker image but bind the local directory inside the container
and define the module path automatically. and define the module path automatically.
""" """
# Version 4.2.1
import logging import logging
import os import os
import pwd import pwd
......
#!/usr/bin/env python3 #!/usr/bin/env python3
"""Imports CSV files into an Odoo server via Odoo import wizard. """Imports CSV files into an Odoo server via Odoo import wizard.
""" """
# Version 4.2.1
import hashlib import hashlib
import hmac import hmac
import logging import logging
......
#!/usr/bin/env python3 #!/usr/bin/env python3
"""Imports CSV files into an Odoo server by using JSONRPC. """Imports CSV files into an Odoo server by using JSONRPC.
""" """
# Version 4.2.1
import csv import csv
import logging import logging
import sys import sys
......
#!/usr/bin/env python3 #!/usr/bin/env python3
"""Imports CSV files into an Oddo database using SQL. """Imports CSV files into an Oddo database using SQL.
""" """
# Version 4.2.1
import csv import csv
import logging import logging
import sys import sys
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
from typing import Optional from typing import Optional
import coloredlogs import coloredlogs
from odoo_scripts import __version__
def add_verbosity_to_parser(parser: argparse.ArgumentParser): def add_verbosity_to_parser(parser: argparse.ArgumentParser):
...@@ -22,7 +23,7 @@ ...@@ -22,7 +23,7 @@
"--quiet", "--quiet",
dest="quiet", dest="quiet",
action="count", action="count",
help="Decreate verbosity level [default: %(default)s]", help="Decrease verbosity level [default: %(default)s]",
default=0, default=0,
) )
...@@ -53,7 +54,12 @@ ...@@ -53,7 +54,12 @@
description=description, description=description,
formatter_class=argparse.RawDescriptionHelpFormatter, formatter_class=argparse.RawDescriptionHelpFormatter,
) )
parser.add_argument("-V", "--version", action="version", version=version) parser.add_argument(
"-V",
"--version",
action="version",
version="{} [odoo_scripts {}]".format(version, __version__),
)
add_verbosity_to_parser(parser) add_verbosity_to_parser(parser)
return parser return parser
......
...@@ -15,16 +15,6 @@ ...@@ -15,16 +15,6 @@
[bumpversion:file:start] [bumpversion:file:start]
[bumpversion:file:odoo_scripts/do_tests.py] [bumpversion:file:odoo_scripts/__init__.py]
[bumpversion:file:odoo_scripts/docker_build.py]
[bumpversion:file:odoo_scripts/docker_dev_start.py]
[bumpversion:file:odoo_scripts/import_base_import.py]
[bumpversion:file:odoo_scripts/import_jsonrpc.py]
[bumpversion:file:odoo_scripts/import_sql.py]
[bumpversion:file:setup.py] [bumpversion:file:setup.py]
...@@ -29,2 +19,3 @@ ...@@ -29,2 +19,3 @@
[bumpversion:file:setup.py] [bumpversion:file:setup.py]
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
setup( setup(
name="odoo_scripts", name="odoo_scripts",
description="Collection of scripts for Odoo",
version="4.2.1", version="4.2.1",
long_description=long_description, long_description=long_description,
long_description_content_type="text/x-rst", long_description_content_type="text/x-rst",
...@@ -49,4 +50,9 @@ ...@@ -49,4 +50,9 @@
}, },
scripts=[], scripts=[],
python_requires=">=3.6", python_requires=">=3.6",
url="https://orus.io/xcg/odoo_scripts/",
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
],
) )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment