Skip to content

Commit

Permalink
Just build newest versions for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jhheider committed Jul 7, 2022
1 parent ec1b032 commit d504eaa
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions scripts/build-all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,20 @@ async function buildIfNeeded({ project, install }: BuildOptions) {
console.verbose({ building: project, install })
const versions = await pantry.getVersions(project)

if (project.constraint.raw == "*") {
const reqs = new Set(versions.map(v => `${v.major}.${v.minor}`))
for (const req of reqs) {
const build = { project: project.project, constraint: new semver.Range(req) }
try {
await buildIfNeeded({ project: build, install })
} catch (error) {
console.verbose({ couldntBuild: { project, req }, error })
}
}
return
}
/// This builds _all_ minors we can find. For now, let's just build the new stuff
// if (project.constraint.raw == "*") {
// const reqs = new Set(versions.map(v => `${v.major}.${v.minor}`))
// for (const req of reqs) {
// const build = { project: project.project, constraint: new semver.Range(req) }
// try {
// await buildIfNeeded({ project: build, install })
// } catch (error) {
// console.verbose({ couldntBuild: { project, req }, error })
// }
// }
// return
// }

const version = semver.maxSatisfying(versions, project.constraint)
if (!version) throw "no-version-found"
const pkg = { project: project.project, version }
Expand Down

0 comments on commit d504eaa

Please sign in to comment.