Compare commits

...

3 Commits

3 changed files with 120 additions and 0 deletions

6
CHANGELOG.md Normal file
View File

@ -0,0 +1,6 @@
# Changelog
## 0.1.0+up25.2.3 2025-05-08
- **Added** Initial Helm chart for BookStack. ✦ Packages upstream BookStack v25.2.3 [Project homepage](https://www.bookstackapp.com/)
- **Added** ✦ Ingress, persistence, TLS and SMTP settings readymade
- **Added** ✦ Includes optional MariaDB and Redis subcharts [MariaDB subchart](https://artifacthub.io/packages/helm/bitnami/mariadb) [Redis subchart](https://artifacthub.io/packages/helm/bitnami/redis)

View File

@ -18,3 +18,34 @@ dependencies:
version: ">=21.0.0 <22.0.0"
repository: "oci://registry-1.docker.io/bitnamicharts"
condition: redis.enabled
annotations:
artifacthub.io/license: MIT
artifacthub.io/links: |
- name: Git Repository
url: https://git.morlana.online/f.weber/bookstack-chart
- name: Issues
url: https://github.com/flweber/helm-bookstack/issues
- name: GitHub Mirror
url: https://github.com/flweber/helm-bookstack
artifacthub.io/maintainers: |
- name: Florian Weber
email: kosmos@morlana.net
artifacthub.io/signKey: |
fingerprint: BCE21EEA25DE14B418196DA1FF6F7246FAA99C30
url: https://raw.githubusercontent.com/flweber/helm-bookstack/refs/heads/main/pubkeys/morlana.asc
artifacthub.io/changes: |
- kind: added
description: Initial Helm chart for BookStack. ✦ Packages upstream BookStack v25.2.3
links:
- name: Project homepage
url: https://www.bookstackapp.com/
- kind: added
description: ✦ Ingress, persistence, TLS and SMTP settings readymade
- kind: added
description: ✦ Includes optional MariaDB and Redis subcharts
links:
- name: MariaDB subchart
url: https://artifacthub.io/packages/helm/bitnami/mariadb
- name: Redis subchart
url: https://artifacthub.io/packages/helm/bitnami/redis

83
generate_changelog.py Normal file
View File

@ -0,0 +1,83 @@
#!/usr/bin/env python3
"""
generate_changelog.py Wandelt den ArtifactHubChangelog in Chart.yaml
in eine MarkdownDatei (CHANGELOG.md) um.
Aufruf:
python generate_changelog.py # takes ./Chart.yaml
python generate_changelog.py path/to/Chart.yaml
"""
import argparse
import datetime as dt
import pathlib
import sys
import textwrap
import yaml
MD_HEADER = "# Changelog\n\n"
def read_chart(path: pathlib.Path) -> dict:
if not path.exists():
sys.exit(f"❌ Chart.yaml not found: {path}")
with path.open() as f:
return yaml.safe_load(f)
def extract_changes(chart: dict) -> list[dict]:
try:
raw = chart["annotations"]["artifacthub.io/changes"]
except KeyError:
sys.exit("❌ No 'artifacthub.io/changes' annotations found.")
try:
return yaml.safe_load(raw) or []
except yaml.YAMLError as e:
sys.exit(f"❌ Changelog annotations are not in a valid YAML format:\n{e}")
def render_markdown(chart: dict, changes: list[dict]) -> str:
version = chart.get("version", "Unversioniert")
today = dt.date.today().isoformat()
heading = f"## {version} {today}\n"
bullets = []
for item in changes:
kind = item.get("kind", "").capitalize()
desc = item.get("description", "").strip()
links = item.get("links", [])
link_md = ""
if links:
link_md = " " + " ".join(f"[{l['name']}]({l['url']})" for l in links)
bullets.append(f"- **{kind}** {desc}{link_md}")
return MD_HEADER + heading + "\n".join(bullets) + "\n"
def main() -> None:
parser = argparse.ArgumentParser(
description="Generates CHANGELOG.md from Chart.yaml annotations."
)
parser.add_argument(
"chart_yaml",
nargs="?",
default="Chart.yaml",
help="Pfad zur Chart.yaml (Standard: ./Chart.yaml)",
)
args = parser.parse_args()
chart_path = pathlib.Path(args.chart_yaml)
chart = read_chart(chart_path)
changes = extract_changes(chart)
changelog_md = render_markdown(chart, changes)
outfile = chart_path.parent / "CHANGELOG.md"
outfile.write_text(changelog_md, encoding="utf-8")
print(f"✅ CHANGELOG.md generated under {outfile.resolve()}.")
if __name__ == "__main__":
main()