Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions scripts/check-orb-stable-release-due.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
// scripts/orb-release-core.ts's buildOrbStableReleaseReport for the underlying logic and rationale.
import { execFileSync } from "node:child_process";
import { writeFileSync } from "node:fs";
import { buildOrbStableReleaseReport, type OrbReleaseCommit } from "./orb-release-core.js";
import { buildOrbStableReleaseReport, latestStableOrbTag, type OrbReleaseCommit } from "./orb-release-core.js";

function main() {
const args = parseArgs(process.argv.slice(2));
const tags = git(["tag", "--list", "orb-v*"])
.split("\n")
.filter(Boolean);
const stableTagName = latestStableTagName(tags);
const stableTagName = latestStableOrbTag(tags)?.tag ?? null;

const report = buildOrbStableReleaseReport({
tags,
Expand All @@ -26,17 +26,6 @@ function main() {
}
}

// Same tag-selection concern as check-orb-release-due.ts's latestStableTagName -- kept here (not exported
// from the core module) since it's a git-log concern, not a pure-logic one.
function latestStableTagName(tags: readonly string[]): string | null {
const stable = tags.filter((tag) => /^orb-v\d+\.\d+\.\d+$/.test(tag));
return stable.sort(compareTagsDesc)[0] ?? null;
}

function compareTagsDesc(left: string, right: string): number {
return right.localeCompare(left, undefined, { numeric: true });
}

type ParsedArgs = { json: boolean; output: string | null };

function parseArgs(argv: readonly string[]): ParsedArgs {
Expand Down
Loading