Compare commits
No commits in common. "3eaa7e6b60bc01b3716f62e9494f1b36fe11d321" and "79877d8eae7bc01a79fd18552f893a0695a5744b" have entirely different histories.
3eaa7e6b60
...
79877d8eae
@ -1,6 +0,0 @@
|
|||||||
# 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 ready‑made
|
|
||||||
- **Added** ✦ Includes optional MariaDB and Redis sub‑charts [MariaDB sub‑chart](https://artifacthub.io/packages/helm/bitnami/mariadb) [Redis sub‑chart](https://artifacthub.io/packages/helm/bitnami/redis)
|
|
@ -18,34 +18,3 @@ dependencies:
|
|||||||
version: ">=21.0.0 <22.0.0"
|
version: ">=21.0.0 <22.0.0"
|
||||||
repository: "oci://registry-1.docker.io/bitnamicharts"
|
repository: "oci://registry-1.docker.io/bitnamicharts"
|
||||||
condition: redis.enabled
|
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 ready‑made
|
|
||||||
- kind: added
|
|
||||||
description: ✦ Includes optional MariaDB and Redis sub‑charts
|
|
||||||
links:
|
|
||||||
- name: MariaDB sub‑chart
|
|
||||||
url: https://artifacthub.io/packages/helm/bitnami/mariadb
|
|
||||||
- name: Redis sub‑chart
|
|
||||||
url: https://artifacthub.io/packages/helm/bitnami/redis
|
|
||||||
|
@ -1,83 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
"""
|
|
||||||
generate_changelog.py – Wandelt den Artifact Hub‑Changelog in Chart.yaml
|
|
||||||
in eine Markdown‑Datei (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()
|
|
Loading…
x
Reference in New Issue
Block a user