| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0d885cc commit dceffcd
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,84 +9,41 @@ def run_cmd(cmd): | |||
| 9 | 9 | ||
| 10 | 10 | def main(): | |
| 11 | 11 | tag_name = os.environ.get("TAG_NAME", "v-dev") | |
| 12 | - commit_sha = run_cmd(["git", "rev-parse", "--short", "HEAD"]) | ||
| 13 | 12 | ||
| 14 | - # Get previous tag | ||
| 15 | - prev_tag = run_cmd(["git", "describe", "--tags", "--abbrev=0", "HEAD^"]) | ||
| 13 | + # Get previous tag matching v* | ||
| 14 | + prev_tag = run_cmd(["git", "describe", "--tags", "--match=v*", "--abbrev=0", "HEAD^"]) | ||
| 16 | 15 | log_range = f"{prev_tag}..HEAD" if prev_tag else "HEAD" | |
| 17 | 16 | ||
| 18 | 17 | # Get commits | |
| 19 | 18 | commits_raw = run_cmd(["git", "log", log_range, "--pretty=format:%s"]) | |
| 20 | 19 | raw_list = [c.strip() for c in commits_raw.split("\n") if c.strip()] if commits_raw else [] | |
| 21 | 20 | ||
| 22 | - # Filter commits | ||
| 21 | + # Filter commits (keep only conventional app changes) | ||
| 23 | 22 | commits = [] | |
| 23 | + allowed_prefixes = ("feat:", "fix:", "refactor:", "perf:") | ||
| 24 | + ignored_keywords = ("gitignore", "badge", "workflow", "readme", "fleet") | ||
| 24 | 25 | for c in raw_list: | |
| 25 | 26 | c_lower = c.lower() | |
| 26 | - if "leanbitlab/jules" in c_lower or "jules" in c_lower: | ||
| 27 | - continue | ||
| 28 | - if c_lower.startswith("chore: update daily downloads and stars badges"): | ||
| 29 | - continue | ||
| 30 | - commits.append(c) | ||
| 31 | - | ||
| 32 | - # Categorized lists | ||
| 33 | - customization = [] | ||
| 34 | - behavior = [] | ||
| 35 | - performance = [] | ||
| 36 | - under_the_hood = [] | ||
| 37 | - | ||
| 38 | - for commit in commits: | ||
| 39 | - commit_lower = commit.lower() | ||
| 40 | - if any(x in commit_lower for x in ["theme", "color", "appearance", "style", "font", "preset", "outline", "transparency", "opacity"]): | ||
| 41 | - customization.append(commit) | ||
| 42 | - elif any(x in commit_lower for x in ["layout", "click", "action", "alarm", "clock", "calendar", "tasks", "steps", "battery", "temp", "weather", "data", "storage", "ram", "screen_time"]): | ||
| 43 | - behavior.append(commit) | ||
| 44 | - elif any(x in commit_lower for x in ["perf", "optimize", "cache", "speed", "fast"]): | ||
| 45 | - performance.append(commit) | ||
| 46 | - else: | ||
| 47 | - under_the_hood.append(commit) | ||
| 27 | + if c_lower.startswith(allowed_prefixes): | ||
| 28 | + if "jules" in c_lower: | ||
| 29 | + continue | ||
| 30 | + if any(kw in c_lower for kw in ignored_keywords): | ||
| 31 | + continue | ||
| 32 | + commits.append(c) | ||
| 48 | 33 | ||
| 49 | 34 | # Build release notes markdown | |
| 50 | 35 | lines = [] | |
| 51 | 36 | lines.append(f"## {tag_name}") | |
| 52 | 37 | lines.append("") | |
| 53 | - | ||
| 54 | - lines.append("💖 **Support Our Work**") | ||
| 55 | - lines.append("We are committed to making our apps as powerful and polished as possible. As an entirely community-funded project, we rely on your support to keep going, please consider becoming a [sponsor](https://github.com/sponsors/LeanBitLab). A huge thank you to all our current supporters!") | ||
| 56 | - lines.append("") | ||
| 57 | - | ||
| 58 | 38 | lines.append("🚀 **What's New**") | |
| 59 | 39 | lines.append("") | |
| 60 | 40 | ||
| 61 | - if customization: | ||
| 62 | - lines.append("🎨 **Customization & Appearance**") | ||
| 63 | - for c in customization: | ||
| 64 | - lines.append(f"- {c}") | ||
| 65 | - lines.append("") | ||
| 41 | + for c in commits: | ||
| 42 | + lines.append(f"- {c}") | ||
| 66 | 43 | ||
| 67 | - if behavior: | ||
| 68 | - lines.append("⌨️ **Layouts & Keyboard Behavior**") | ||
| 69 | - for c in behavior: | ||
| 70 | - lines.append(f"- {c}") | ||
| 71 | - lines.append("") | ||
| 72 | - | ||
| 73 | - if performance: | ||
| 74 | - lines.append("⚡ **Performance & Spellchecking**") | ||
| 75 | - for c in performance: | ||
| 76 | - lines.append(f"- {c}") | ||
| 77 | - lines.append("") | ||
| 78 | - | ||
| 79 | - if under_the_hood: | ||
| 80 | - lines.append("⚙️ **Under the Hood**") | ||
| 81 | - for c in under_the_hood: | ||
| 82 | - lines.append(f"- {c}") | ||
| 83 | - lines.append("") | ||
| 84 | - | ||
| 85 | - lines.append("📦 **Downloads**") | ||
| 86 | - | ||
| 87 | 44 | # Ensure file is written correctly | |
| 88 | 45 | with open("release_notes.md", "w") as f: | |
| 89 | - f.write("\n".join(lines)) | ||
| 46 | + f.write("\n".join(lines).strip() + "\n") | ||
| 90 | 47 | ||
| 91 | 48 | if __name__ == "__main__": | |
| 92 | 49 | main() | |
| Back | FazBrowse Home | New Git URL |
0 commit comments