mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
prepare fnc for loading metadata
This commit is contained in:
parent
dd61714435
commit
285e6fe93e
@ -345,16 +345,20 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin):
|
||||
return getattr(self, fnc_name, True)
|
||||
return False
|
||||
|
||||
# git
|
||||
# package info
|
||||
def get_package_commit(self):
|
||||
"""get last git commit for plugin"""
|
||||
return get_git_log(self.def_path)
|
||||
|
||||
def get_package_metadata(self):
|
||||
"""get package metadata for plugin"""
|
||||
return {}
|
||||
|
||||
def set_package(self):
|
||||
"""add packaging info of the plugins into plugins context"""
|
||||
if self.is_package:
|
||||
# is a package - no commit
|
||||
package = {}
|
||||
package = self.get_package_metadata()
|
||||
else:
|
||||
# fetch git commit
|
||||
package = self.get_package_commit()
|
||||
|
Loading…
Reference in New Issue
Block a user