1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

chore: release script should automatically figure out CLI crate dependencies (#13992)

This commit is contained in:
David Sherret 2022-03-16 20:33:14 -04:00 committed by GitHub
parent f7ab41583e
commit 92bb251058
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 33 deletions

View file

@ -12,7 +12,7 @@ const originalCliVersion = cliCrate.version;
await cliCrate.promptAndIncrement(); await cliCrate.promptAndIncrement();
// increment the dependency crate versions // increment the dependency crate versions
for (const crate of workspace.getDependencyCrates()) { for (const crate of workspace.getCliDependencyCrates()) {
await crate.increment("minor"); await crate.increment("minor");
} }

View file

@ -6,7 +6,9 @@ import { getCratesPublishOrder } from "./deps.ts";
const workspace = await DenoWorkspace.load(); const workspace = await DenoWorkspace.load();
const cliCrate = workspace.getCliCrate(); const cliCrate = workspace.getCliCrate();
const dependencyCrates = getCratesPublishOrder(workspace.getDependencyCrates()); const dependencyCrates = getCratesPublishOrder(
workspace.getCliDependencyCrates(),
);
try { try {
for (const [i, crate] of dependencyCrates.entries()) { for (const [i, crate] of dependencyCrates.entries()) {

View file

@ -28,42 +28,17 @@ export class DenoWorkspace {
return this.#repo.crates; return this.#repo.crates;
} }
/** Gets the dependency crates used for the first part of the release process. */ /** Gets the CLI dependency crates that should be published. */
getDependencyCrates() { getCliDependencyCrates() {
return [ return this.getCliCrate()
this.getBenchUtilCrate(), .descendantDependenciesInRepo()
this.getSerdeV8Crate(), .filter((c) => c.name !== "test_util");
this.getCoreCrate(),
...this.getExtCrates(),
this.getRuntimeCrate(),
];
}
getSerdeV8Crate() {
return this.getCrate("serde_v8");
} }
getCliCrate() { getCliCrate() {
return this.getCrate("deno"); return this.getCrate("deno");
} }
getCoreCrate() {
return this.getCrate("deno_core");
}
getRuntimeCrate() {
return this.getCrate("deno_runtime");
}
getBenchUtilCrate() {
return this.getCrate("deno_bench_util");
}
getExtCrates() {
const extPath = path.join(this.#repo.folderPath, "ext");
return this.crates.filter((c) => c.manifestPath.startsWith(extPath));
}
getCrate(name: string) { getCrate(name: string) {
return this.#repo.getCrate(name); return this.#repo.getCrate(name);
} }

View file

@ -1,3 +1,3 @@
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
export * from "https://raw.githubusercontent.com/denoland/automation/0.4.0/mod.ts"; export * from "https://raw.githubusercontent.com/denoland/automation/0.5.0/mod.ts";