mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 04:26:44 +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 getattr(self, fnc_name, True)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# git
|
# package info
|
||||||
def get_package_commit(self):
|
def get_package_commit(self):
|
||||||
"""get last git commit for plugin"""
|
"""get last git commit for plugin"""
|
||||||
return get_git_log(self.def_path)
|
return get_git_log(self.def_path)
|
||||||
|
|
||||||
|
def get_package_metadata(self):
|
||||||
|
"""get package metadata for plugin"""
|
||||||
|
return {}
|
||||||
|
|
||||||
def set_package(self):
|
def set_package(self):
|
||||||
"""add packaging info of the plugins into plugins context"""
|
"""add packaging info of the plugins into plugins context"""
|
||||||
if self.is_package:
|
if self.is_package:
|
||||||
# is a package - no commit
|
# is a package - no commit
|
||||||
package = {}
|
package = self.get_package_metadata()
|
||||||
else:
|
else:
|
||||||
# fetch git commit
|
# fetch git commit
|
||||||
package = self.get_package_commit()
|
package = self.get_package_commit()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user