Skip to content

Commit

Permalink
fix(build): actually reverse was misplaced
Browse files Browse the repository at this point in the history
  • Loading branch information
lowlighter committed Jun 12, 2024
1 parent 1f75ee4 commit 91543e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/build/ssg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ export async function ssg() {
if (major === "0") {
continue
}
const version = versions.filter((version: string) => version.startsWith(`${major}.`))[0]
const version = versions.filter((version: string) => version.startsWith(`${major}.`)).reverse()[0]
await copy(new URL(`.pages/v/${version}`, root), new URL(`.pages/v/${major}`, root))
console.log(`Created .pages/v/${major} from version ${version}`)
}
for (const minor of new Set<string>(versions.map((version: string) => `${version.split(".")[0]}.${version.split(".")[1]}`))) {
if (minor.startsWith("0.")) {
continue
}
const version = versions.filter((version: string) => version.startsWith(`${minor}.`))[0]
const version = versions.filter((version: string) => version.startsWith(`${minor}.`)).reverse()[0]
await copy(new URL(`.pages/v/${version}`, root), new URL(`.pages/v/${minor}`, root))
console.log(`Created .pages/v/${minor} from version ${version}`)
}
Expand Down

0 comments on commit 91543e9

Please sign in to comment.