Unified · Split
| @@ -4,6 +4,7 @@ on: · 3 unmodified lines | ||
| 4 | 4 | push: |
| 5 | 5 | tags: |
| 6 | 6 | - "v*.*.*" |
| 7 | + - "!v*-nightly.*" | |
| 7 | 8 | schedule: |
| 8 | 9 | - cron: "0 */3 * * *" |
| 9 | 10 | workflow_dispatch: |
| @@ -41,7 +42,7 @@ jobs: · 31 unmodified lines | ||
| 41 | 42 | - id: check |
| 42 | 43 | name: Compare HEAD to last nightly tag |
| 43 | 44 | run: | |
| 44 | − last_nightly_tag=$(git tag --list 'nightly-v*' --sort=-creatordate | head -n 1) | |
| 45 | + last_nightly_tag=$(git tag --list 'v*-nightly.*' 'nightly-v*' --sort=-creatordate | head -n 1) | |
| 45 | 46 | if [[ -z "$last_nightly_tag" ]]; then |
| 46 | 47 | echo "No previous nightly tag found. Proceeding with release." |
| 47 | 48 | echo "has_changes=true" >> "$GITHUB_OUTPUT" |
| @@ -220,7 +220,7 @@ try { · 219 unmodified lines | ||
| 220 | 220 | ); |
| 221 | 221 | assertContains( |
| 222 | 222 | nightlyReleaseMetadata, |
| 223 | − "tag=nightly-v9.9.10-nightly.20260413.321", | |
| 223 | + "tag=v9.9.10-nightly.20260413.321", | |
| 224 | 224 | "Expected nightly metadata to contain the derived nightly tag.", |
| 225 | 225 | ); |
| 226 | 226 | assertContains( |
| @@ -24,7 +24,7 @@ it("derives nightly metadata including the short commit sha in the release name" · 23 unmodified lines | ||
| 24 | 24 | { |
| 25 | 25 | baseVersion: "9.9.10", |
| 26 | 26 | version: "9.9.10-nightly.20260413.321", |
| 27 | − tag: "nightly-v9.9.10-nightly.20260413.321", | |
| 27 | + tag: "v9.9.10-nightly.20260413.321", | |
| 28 | 28 | name: "T3 Code Nightly 9.9.10-nightly.20260413.321 (abcdef123456)", |
| 29 | 29 | shortSha: "abcdef123456", |
| 30 | 30 | }, |
| @@ -54,7 +54,7 @@ export const resolveNightlyReleaseMetadata = ( · 53 unmodified lines | ||
| 54 | 54 | return { |
| 55 | 55 | baseVersion, |
| 56 | 56 | version, |
| 57 | − tag: `nightly-v${version}`, | |
| 57 | + tag: `v${version}`, | |
| 58 | 58 | name: `T3 Code Nightly ${version} (${shortSha})`, |
| 59 | 59 | shortSha, |
| 60 | 60 | }; |
| @@ -75,11 +75,17 @@ const parseStableTag = (tag: string): StableVersion | undefined => { · 74 unmodified lines | ||
| 75 | 75 | const [, major, minor, patch, prerelease] = match; |
| 76 | 76 | if (!major || !minor || !patch) return undefined; |
| 77 | 77 | |
| 78 | + const prereleaseIdentifiers = prerelease ? prerelease.split(".") : []; | |
| 79 | + // Nightly tags also start with `v` and carry a `nightly.*` prerelease | |
| 80 | + // identifier. They must not be considered stable candidates when resolving | |
| 81 | + // the previous stable tag. | |
| 82 | + if (prereleaseIdentifiers[0] === "nightly") return undefined; | |
| 83 | + | |
| 78 | 84 | return { |
| 79 | 85 | major: Number(major), |
| 80 | 86 | minor: Number(minor), |
| 81 | 87 | patch: Number(patch), |
| 82 | − prerelease: prerelease ? prerelease.split(".") : [], | |
| 88 | + prerelease: prereleaseIdentifiers, | |
| 83 | 89 | }; |
| 84 | 90 | }; |
| 85 | 91 | |
| @@ -92,7 +98,9 @@ const compareNightlyVersions = (left: NightlyVersion, right: NightlyVersion): nu · 6 unmodified lines | ||
| 92 | 98 | }; |
| 93 | 99 | |
| 94 | 100 | const parseNightlyTag = (tag: string): NightlyVersion | undefined => { |
| 95 | − const match = /^nightly-v(\d+)\.(\d+)\.(\d+)-nightly\.(\d{8})\.(\d+)$/.exec(tag); | |
| 101 | + // Accept both the current `v<semver>` format and the legacy `nightly-v<semver>` | |
| 102 | + // format so release note diffs keep working across the tag-format transition. | |
| 103 | + const match = /^(?:nightly-)?v(\d+)\.(\d+)\.(\d+)-nightly\.(\d{8})\.(\d+)$/.exec(tag); | |
| 96 | 104 | if (!match) return undefined; |
| 97 | 105 | |
| 98 | 106 | const [, major, minor, patch, date, runNumber] = match; |