Skip to content
Open
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
12 changes: 7 additions & 5 deletions scripts/set-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import { existsSync, readFileSync, writeFileSync } from "fs";
import { join } from "path";
import { join, posix } from "path";
import { execFileSync } from "child_process";
import { pathToFileURL } from "url";
import { CLI_SEMVER_PATTERN } from "./cli-options.ts";
Expand Down Expand Up @@ -259,7 +259,8 @@ export function missingChangelogArtifacts(version: string) {
}

export function changelogArtifacts(version: string) {
return [join("releases", `v${version}.md`), `docs/changelog.mdx#HyperFrames v${version}`];
// Git paths are always slash-separated, including when release tooling runs on Windows.
return [posix.join("releases", `v${version}.md`), `docs/changelog.mdx#HyperFrames v${version}`];
}

export function unreviewedChangelogArtifacts(version: string) {
Expand Down Expand Up @@ -310,10 +311,11 @@ export function docsChangelogEntryHasGeneratedTodo(content: string, marker: stri

export function releaseAllowedPaths(version: string) {
return [
...PACKAGES.map((pkg) => join(pkg, "package.json")),
...PLUGINS.map((plugin) => join(plugin, "plugin.json")),
// These values are compared with Git's slash-separated path output.
...PACKAGES.map((pkg) => posix.join(pkg, "package.json")),
...PLUGINS.map((plugin) => posix.join(plugin, "plugin.json")),
"docs/changelog.mdx",
join("releases", `v${version}.md`),
posix.join("releases", `v${version}.md`),
];
}

Expand Down