mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge remote-tracking branch 'origin/topic/awelzel/2837-builtin-plugin-ci-take-two'
* origin/topic/awelzel/2837-builtin-plugin-ci-take-two: cirrus: Add smoke testing for builtin plugins ci/collect-repo-info: Make plugin VERSION reading more robust configure: Quote --include-plugins argument Fix --no-install-recommends typo
This commit is contained in:
commit
dc068270ea
35 changed files with 460 additions and 4 deletions
|
@ -116,6 +116,19 @@ def collect_git_info(zeek_dir: pathlib.Path):
|
|||
return info
|
||||
|
||||
|
||||
def read_plugin_version(plugin_dir: pathlib.Path):
|
||||
"""
|
||||
Open the VERSION file, look for the first non empty
|
||||
non comment line and return it.
|
||||
"""
|
||||
with (plugin_dir / "VERSION").open() as f:
|
||||
for line in f:
|
||||
line = line.strip()
|
||||
if line and not line.startswith("#"):
|
||||
return line
|
||||
return ""
|
||||
|
||||
|
||||
def collect_plugin_info(plugin_dir: pathlib.Path):
|
||||
""" """
|
||||
# A plugin's name is not part of it's metadata/information, use
|
||||
|
@ -125,7 +138,7 @@ def collect_plugin_info(plugin_dir: pathlib.Path):
|
|||
}
|
||||
|
||||
try:
|
||||
result["version"] = (plugin_dir / "VERSION").read_text().strip()
|
||||
result["version"] = read_plugin_version(plugin_dir)
|
||||
except FileNotFoundError:
|
||||
logger.warning("No VERSION found in %s", plugin_dir)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue