Release notes written from the commits since the previous tag
Build / Desktop, server and tools (push) Successful in 41s

- The release page's "What's new" now comes from each commit's subject and body since the
  previous tag, without trailers or any line naming the assistant that helped write them.
- `tools/release.sh notes` writes the notes alone; the release checkout fetches the tags.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012CzABvBkbcFqoHdmi8b9WB
This commit is contained in:
thepraandClaude Opus 5.5 committed 2026-10-15 09:22:16 +02:00
1 parent 20f8b2149f
commit ea971d2aea
3 files changed
+39 -5

No files matched your search

+32 -5
View File
@@ -22,9 +22,9 @@ if (version is null || !Regex.IsMatch(version, @"^\d+\.\d{1,2}\.\d{1,2}$"))
}
var words = args.Where((a, i) => !a.StartsWith("--", StringComparison.Ordinal) && (i == 0 || !args[i - 1].StartsWith("--", StringComparison.Ordinal)))
.Select(a => a.ToLowerInvariant()).ToList();
if (words.Count == 0 || words.Any(w => w != "all" && !targetNames.Contains(w)))
if (words.Count == 0 || words.Any(w => w != "all" && w != "notes" && !targetNames.Contains(w)))
{
Console.Error.WriteLine("usage: tools/release.sh <all|linux|windows|macos|android|server>... [--commit <sha>]");
Console.Error.WriteLine("usage: tools/release.sh <all|linux|windows|macos|android|server|notes>... [--commit <sha>]");
return 2;
}
var targets = words.Contains("all") ? targetNames.ToList() : targetNames.Where(words.Contains).ToList();
@@ -37,6 +37,12 @@ var server = Path.Combine(root, "src", "MeWeb.Server", "MeWeb.Server.csproj");
var branding = Path.Combine(root, "branding");
Directory.CreateDirectory(output);
Console.WriteLine($"me-web? {version} ({commit}): {string.Join(", ", targets)} -> {output}");
if (targets.Count == 0)
{
WriteNotes();
Console.WriteLine(File.ReadAllText(Path.Combine(root, "artifacts", "release-notes.md")));
return 0;
}
var failed = false;
if (targets.Any(t => t != "server"))
@@ -72,19 +78,40 @@ return failed ? 1 : 0;
void WriteNotes()
{
var source = Path.Combine(root, "artifacts", "knowledge", "SOURCE.txt");
var lines = new List<string>
{
var lines = Changes();
lines.AddRange(
[
$"me-web? {version}, commit {commit}, built {builtAt}.",
"",
"Built with the provider map from iptoasn.com (PDDL 1.0):",
"",
};
]);
lines.AddRange(File.Exists(source) ? File.ReadAllLines(source).Where(l => l.Length > 0).Select(l => $" {l}") : [" (no provider map in this build)"]);
lines.AddRange(["", "SHA256SUMS.txt lists every file. The APK's signing certificate SHA-256 is 5f52cff4f52f4e0b6da6cd044bfceaf78d1d42db24f2470602db7f19cbfdf846."]);
Directory.CreateDirectory(Path.Combine(root, "artifacts"));
File.WriteAllLines(Path.Combine(root, "artifacts", "release-notes.md"), lines);
}
List<string> Changes()
{
var previous = Capture("git", "-C", root, "describe", "--tags", "--abbrev=0", "--match", "v*", "HEAD^").Trim();
var log = Capture("git", "-C", root, "log", "--no-merges", "--reverse", "--format=%x1e%s%x1f%b", previous.Length > 0 ? $"{previous}..HEAD" : "HEAD");
var lines = new List<string>();
foreach (var entry in log.Split('\x1e', StringSplitOptions.RemoveEmptyEntries))
{
var parts = entry.Split('\x1f');
var subject = Regex.Replace(parts[0].Trim(), @"^me-web\? [\d.]+:\s*", "");
if (subject.Length == 0) continue;
var body = (parts.Length > 1 ? parts[1] : "").Split('\n').Select(l => l.TrimEnd())
.Where(l => !Regex.IsMatch(l, @"^[A-Za-z-]+-(By|Session|Off-By):", RegexOptions.IgnoreCase))
.Where(l => !l.Contains("claude", StringComparison.OrdinalIgnoreCase))
.SkipWhile(l => l.Length == 0).Reverse().SkipWhile(l => l.Length == 0).Reverse().ToList();
lines.AddRange([$"### {char.ToUpperInvariant(subject[0])}{subject[1..]}", ""]);
if (body.Count > 0) lines.AddRange([.. body, ""]);
}
return lines.Count == 0 ? [] : [$"## What's new in {version}", "", .. lines];
}
string[] Stamp() => [$"-p:Version={version}", $"-p:BuildCommit={commit}", $"-p:BuildTimeUtc={builtAt}"];
string Linux()