Skip to content

Conversation

@sebastienbeau
Copy link
Member

we need to take our time to discuss more about it
but to have at least a first common version just add it as an option

we need to take our time to discuss more about it
but to have at least a first common version just add it as an option
Comment on lines +64 to +66
subprocess.run(f"git tag {version}", shell=True, check=True)
subprocess.run("git push origin --tag", shell=True, check=True)
subprocess.run(f"git push origin {ODOO_VERSION}", shell=True, check=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
subprocess.run(f"git tag {version}", shell=True, check=True)
subprocess.run("git push origin --tag", shell=True, check=True)
subprocess.run(f"git push origin {ODOO_VERSION}", shell=True, check=True)
subprocess.run("git push origin", shell=True, check=True)
subprocess.run(f"glab ci trigger publish", shell=True, check=True)

def get_before_request(cr):
cr.execute("SELECT latest_version FROM ir_module_module WHERE name='custom_all'")
todo = []
db_version = cr.fetchone()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add something like :
db_version = db_version and db_version[0] or False
Because the result of the sql query is None if custom_all does not exists in ir_module_module (which is fine)
But it is (None,) if it exists but is not installed. Which is evaluated as True and make the script to fail later.

Of course the line db_version = db_version[0] above should then be removed.
@sebastienbeau

todo = []
db_version = cr.fetchone()
if not db_version:
_logger.error("No version found for custom_all, skip begin script")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it misses a return todo here I guess... Because right now, the script is not skipped and will fail when comparing None to the version !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants